Namespaces

Classes

Class for AbstractCardController

Abstract Class for Document Controllers Contains the shared logic to display a table of files.

Class for AbstractListController

Class to manage bank accounts

Class to manage bank transaction lines

API class for accountancy

Class to manage categories of an accounting account

Manage the different format accountancy export

Manage the different format accountancy import

Class to manage reports for accounting categories

Class to manage accountancy systems

Class to manage accounting accounts

Class to manage accounting journals

Class to manage agenda events (actions)

Class for ActionCommReminder

Class to manage members using default canvas

\class ActionsAdherentCardDefault \brief Class allowing the management of the members by default

Abstract class to manage third parties

ActionsCardCompany
ActionsCardIndividual

Class with controller methods for product canvas

Class with controller methods for service canvas

\class ActionsContactCardCommon \brief Common Abstract Class for contact managmeent

\class ActionsContactCardDefault \brief Default Class to manage contacts

Class ActionsMyModule

Class Actions Stripe Connect

Class Actions of the module ticket

Class to manage members of a foundation.

Class to manage statistics of members

Class to manage members type

Class to manage advanced emailing target selector

API class for Agenda Events

Ai

Class for AI

Class to scan for virus

Class for Asset

Class for AssetAccountancyCodes

Class for AssetAccountancyCodes

Class for AssetDepreciationOptions

Class for AssetModel

Class for Availabilities

Class AvailabilitiesLine. You can also remove this and generate a CRUD class for lines objects.

BOM

Class for BOM

Class for BOMLine

API class for accounts

Class to manage bank categories

Class to manage Blocked Log

API class for BOM

Class to manage withdrawal receipts

Class to manage Ledger (General Ledger and Subledger)

Class BookKeepingLine

Class to manage bookmarks

Class to boolean field

Class of file to build cheque deposit receipts

Class to manage different types of events

Object of table llx_c_email_templates

Class CGenericDic

Class of dictionary of opportunity status

Class to send emails (with attachments or not) Usage: $mailfile = new CMailFile($subject,$sendto,$replyto,$message,$filepath,$mimetype,$filename,$cc,$ccc,$deliveryreceipt,$msgishtml,$errors_to,$css,$trackid,$moreinheader,$sendcontext,$replyto); $mailfile->sendfile();

Class of dictionary of nature of product (used by imports)

Class to send SMS Usage: $smsfile = new CSMSFile($subject,$sendto,$replyto,$message,$filepath,$mimetype,$filename,$cc,$ccc,$deliveryreceipt,$msgishtml,$errors_to); $smsfile->socid=...; $smsfile->contact_id=...; $smsfile->member_id=...; $smsfile->fk_project=...; $smsfile->sendfile();

Class for MyObject

Class of dictionary type of thirdparty (used by imports)

Class for Calendar

Class CalendarLine. You can also remove this and generate a CRUD class for lines objects.

Class to manage canvas

Class to manage cash fence

Class to manage categories

API class for categories

Class Cchargesociales

Class to manage dictionary Countries (used by imports)

Define Common function to access calendar items and format it in vCalendar

Class for managing the social charges.

Class to checkbox field (multiselect)

Class to chkbxlst field (multiselect)

Class to manage customers or prospects

Class to manage customers orders

Class to manage predefined suppliers products

Class to manage table ReceptionLineBatch.

Class to manage line orders

Class to manage order statistics (customer and supplier)

Class to manage comment

Parent class of all other dictionary classes

Parent class for documents (PDF, ODT, ...) generators

Class to common field

Class to common geo field (for linestrg, multipts, point, polygon, ...)

Parent class of all other hook actions classes

Trait for incoterm classes

Superclass for invoice classes

Parent class of all other business classes for details of elements (invoices, contracts, proposals, orders, ...)

Parent class for number ref generators

Parent class of all other business classes (invoices, contracts, proposals, orders, ...)

Parent class for class inheritance lines of business objects This class is useless for the moment so no inherit are done on it

Superclass for orders classes

Superclass for orders classes

Support class for third parties, contacts, members, users or resources

Class to common select field

Class to common sellist field

Trait for common signed business objects

Superclass for social networks

Class to generate stick sheet with format Avery or other personalised format

Trait CommonSubtotal

Parent class of all other business classes (invoices, contracts, proposals, orders, ...)

Class to manage bank accounts description of third parties

Class for CompanyPaymentMode

Class to stock current configuration

Class for ConferenceOrBooth

Class for ConferenceOrBoothAttendee

Class ConferenceOrBoothAttendeeLine. You can also remove this and generate a CRUD class for lines objects.

Class to manage contact/addresses

API class for contacts

Class Context

API class for contracts

Class to manage contracts

Class to manage lines of contracts

Class to manage pages

Class Cpaiement

Class to manage dictionary Regions

Cron Job class

Class to manage dictionary States (used by imports)

Class of dictionary type of thirdparty (used by imports)

Class Ctyperesource

Class CtyperesourceLine

Class CurrencyRate

Class DataPolicyCron

Class to date field

Class to datetime field

Class to datetimegmt field

Class for DefaultController

Class for MyObject

Class to manage receptions

Management class of delivery note lines

Class to manage trips and working credit notes

Class to manage the statistics of travel and expense notes

Class for handling Diaspora API interactions

A class containing functions for computing diffs and formatting the output.

Class to manage absolute discounts

Class for DocumentController

Class for DocumentListController

Class to manage UI documentation

API class for receive files

DolConfigCollector class

Class for handling deprecated properties and methods

Class to manage a WYSIWYG editor.

DolExceptionsCollector class

\class DolGeoIP \brief Class to manage GeoIP conversion Usage: $geoip=new GeoIP('country',$datfile); $geoip->getCountryCodeFromIP($ip); $geoip->close();

Class to manage Geo processing Usage: $dolgeophp=new DolGeoPHP($db);

Class to build graphs.

DolRequestDataCollector class

DolLogsCollector class

DolMemoryCollector class

DolQueryCollector class

DolRequestDataCollector class

DolTimeDataCollector class

Class to manage Dolibarr database access

Class to manage Dolibarr database access for a MySQL database using the MySQLi extension

Class to drive a PostgreSQL database for Dolibarr

Class to manage Dolibarr database access for a SQLite database

Class for API REST v1

Dolibarr API access class

DolibarrCollector class

DolibarrDebugBar class

Class DolibarrModules

Class that all triggers must inherit

DAO Resource object

Don

Class to manage donations

Class to manage donations statistics

API class for donations

Class to double field

Class to duration field

Class to manage ECM directories

Class to manage ECM files

Class of an index line of a document

Class for EmailCollector

Class for EmailCollectorAction

Class for EmailCollectorFilter

Class to email field

Class for EmailSenderProfile

API for handling Object of table llx_c_email_templates

Class to manage warehouses

Class to manage establishments

Class EvalMath

Class for internal use

Class for Evaluation

Class for EvaluationLine

API for handling Object of table llx_eventorganization_conferenceorboothattendee

Events class

Class to manage shipments

Class to manage lines of shipment

CRUD class for batch number management within shipment

Class to manage shipment statistics

Class to manage Trips and Expenses

Class to manage inventories

Class of expense report details lines

Class to manage inventories

Class to manage the statistics of the expensereports and expense notes

API class for Expense Reports

Class to manage exports

Class to build export files with format CSV

Class to build export files with format CSV iso

Class to build export files with format CSV utf-8

Class to build export files with Excel format

Class to build export files with format TSV

Class ExternalModules

Class to manage standard extra fields

Class to manage standard extra languages

Class to manage invoices

Class to manage suppliers invoices

Class to manage supplier invoice lines of templates.

Class to manage invoice templates

Class to manage invoice lines.

Class to manage invoice lines of templates.

Class to manage invoice templates

Class to manage stats for invoices (customer and supplier)

Class to parse Fediverse files

Class to manage interventions

Class to manage intervention lines

Class to manage recurring interventions

Class to manage intervention statistics

Class to stock field infos

Class to manage fields

This class is used to manage file upload using ajax

Class to manage fiscal year

Class to manage generation of HTML components Only common components must be here.

Class permettant la generation du formulaire html d'envoi de mail unitaire Usage: $formail = new FormAI($db) $formai->proprietes=1 ou chaine ou tableau de valeurs $formai->show_form() affiche le formulaire

Class to manage generation of HTML components for accounting management

Class to manage building of HTML components

Class to generate html code for admin pages

Class to manage building of HTML components

Class to manage generation of HTML components for bank module

Class to manage barcode HTML

Class to manage generation of HTML components Only common components for WebPortal must be here.

Class to manage forms for categories

Class of forms component to manage companies

Class to manage generation of HTML components for contract module

Class to manage building of HTML components

Class to manage HTML component for ECM and generic filemanager

Class to manage generation of HTML components for contract module

Class to offer components to list and upload files

Class to manage generation of HTML components for accounting management

Class to manage generation of HTML components for intervention module

Class to manage generation of HTML components for ldap module

Class to manage generation of HTML components Only common components for WebPortal must be here.

Class permettant la generation du formulaire html d'envoi de mail unitaire Usage: $formail = new FormMail($db) $formmail->proprietes=1 ou chaine ou tableau de valeurs $formmail->show_form() affiche le formulaire

Class to offer components to list and upload files

Class permettant la generation de composants html autre Only common components are here.

Class to manage HTML output components for orders Before adding component here, check they are not into common part Form.class.php

Class permettant la generation de composants html autre Only common components are here.

Class with static methods for building HTML components related to products Only components common to products and services must be here.

Class to manage building of HTML components

Class to manage generation of HTML components for proposal management

Class to manage forms for the module resource

This class help you create setup render.

This class help to create item for class formSetup

Class permettant la generation du formulaire d'envoi de Sms Usage: $formsms = new FormSms($db) $formsms->proprietes=1 ou chaine ou tableau de valeurs $formsms->show_form() affiche le formulaire

Class to manage generation of HTML components for social contributions management

Class to generate the form for creating a new ticket.

Class to manage generation of HTML components Only common components for WebPortal must be here.

Class to manage component html for module website

Class to manage suppliers

Class of a generic business object

Class to manage a Leaflet map width geometrics objects

Class to manage Google API

Class HistoryLine. You can also remove this and generate a CRUD class for lines objects.

Class of the module paid holiday. Developed by Teclib ( http://www.teclib.com/ )

API class for Leaves

Class for Hook

Class to manage hooks

Class to html field

Class to read/parse ICal calendars

Class to icon field

Class to manage imports

Class to import CSV files

Class to import Excel files

Class to manage boxes on pages. This is an utility class (all is static)

Class to int field

Class of triggered functions for agenda module

Class of triggered functions for agenda module

Class of triggered functions for agenda module

Class of triggered functions for agenda module

Class of triggers for ldap module

Class of triggers for security audit events

Class of triggers for MailmanSpip module

Class of triggers for MyModule module

Class of triggers for notification module

Class of triggers for stripe module

Class of triggers for ticket module

Class of triggers for Webhook module

Class of triggers for workflow module

Class of triggers for Zapier module

Class to manage triggers

API class for Interventions

Class to manage intracomm report

Class for Inventory

Class InventoryLine

Class for InvoiceListController

API class for invoices

Class to ip field

Job

Class for Job

Class JobLine. You can also remove this and generate a CRUD class for lines objects.

API class for knowledgemanagement knowledgerecord

Class for KnowledgeRecord

Class KnowledgeRecordLine. You can also remove this and generate a CRUD class for lines objects.

Class to manage LDAP features

The LESS compiler and parser.

Class Lettering

Class to manage withdrawals

Class to linestrg field

Class to manage links

Class to link field

Loan

Class to manage Schedule of loans

Class to manage local tax

Parent class for log handlers

API that allows to log in with an user account.

Class for LoginController

Class to manage emailings module

Class to manage emailings module

Parent class of emailing target selectors modules

API class for mass mailings

Class to manage mailman and spip

Class for handler Mastodon

Class for MemberCardController

API class for members

API class for members types

Class to manage left menus

Class to manage menu Empty

Class to manage menu entries

Mo

Class for Mo

Class MoLine. You can also remove this and generate a CRUD class for lines objects.

ModelMail deprecated

Old class name for Object of table llx_c_email_templates I prefer the CEmailTemplate name as it better reflects the database

Parent class for all contract numbering modules

Parent Class of numbering models of sending receipts references

Parent class for all holidays numbering modules

Parent Class of numbering models of sending receipts references

Parent class for third parties accountancy code generators

\class ModeleAction \brief Parent class for product models of doc generators

Parent class for bank account models

Parent class for barcode document generators (image)

Class ModeleBoxes

Parent class for password rules/management modules

Class parent for templates of document generation

Parent class of subscription templates

Parent class for trips and expenses templates

Parent class for export modules

Parent class for password rules/management modules

Parent class for import file readers

Parent class to manage numbering of Asset

Parent class for barcode numbering models

Parent class to manage numbering of batch products

Parent class to manage numbering of BOMs

Parent class to manage numbering of Sale Orders

Class parent for cheque Receipts numbering references mother class

Parent class to manage numbering of Sale Orders

Class mere des modeles de numerotation des references de bon de livraison

Parent class of donation numbering templates

Parent class to manage numbering of Evaluation

Parent class for numbering masks of expense reports

Parent class of invoice reference numbering templates

Parent class numbering models of intervention sheet references

Parent class to manage numbering of KnowledgeRecord

Class mere des modeles de numerotation des references de members

Parent class to manage numbering of MOs

Parent class to manage numbering of MyObject

Parent class to manage numbering of Partnership

Payment numbering references mother class

Class parent for numbering modules of tasks

Parent class for numbering rules of proposals

Parent class to manage numbering of RecruitmentCandidature

Parent class to manage numbering of RecruitmentJobPosition

Parent class to manage numbering of StockTransfer

ModeleNumRefSupplierPayments

Parent class of the Proposal numbering model classes

Parent Class of numbering models of suppliers invoices references

Parent Class of numbering models of supplier order references

Parent Class of the models to number the cash register receipts

Parent class of task reference numbering models

Parent Class of the project reference numbering model classes

Parent class to manage numbering of Workstation

Parent class for documents models

Parent class for boms models

Parent class of document generator for members cards.

Parent class for orders models

Parent class to manage intervention document templates

Class mere des modeles de bon de livraison

Parent class for documents models

Parent class of invoice document generators

Parent class to manage intervention document templates

Parent class to manage holidays document templates

Parent class for documents models

Parent class of document generator for address sheet.

Parent class to manage intervention document templates

Parent class for mos models

Parent class to manage warehouse movement document templates

Parent class for document models

Parent class for documents models

Parent class to manage intervention document templates

Parent class to manage intervention document templates

Parent class for projects models

Class mere des modeles de propale

Parent class for documents models

Parent class for documents models

Parent class for stock models of doc generators

Parent class for documents models

Perent class of the Proposal models

Parent class for supplier invoices models

Parent class for supplier orders models

Parent class for supplier invoices models

Parent class for task models

Parent class for documents models

Parent class to manage intervention document templates

Parent class to manage intervention document templates

Parent class for documents models

Parent class of accountancy models

Parent class of sending receipts models

Parent class of sending receipts models

Class template for classes of numbering product

Parent class for third parties code generators

Parent class for third parties models of doc generators

Mos

API class for MO

Class to manage stock movements

API class for MultiCurrency

Class Currency

Class to multipts field

API class for mymodule myobject

Class for MyObject

Class MyObjectLine. You can also remove this and generate a CRUD class for lines objects.

Class MyObjectTest

Class to manage the table of subscription to notifications

Parent class of all other business classes (invoices, contracts, proposals, orders, ...)

API that gives shows links between objects in an Dolibarr instance.

Put here description of your class

Class to manage order lines

Class for OrderListController

API class for orders

Class to manage payments of customer invoices

Class to manage payments for supplier invoices

API class for paiement

Class for Partnership

Class for PartnershipCardController

Class PartnershipLine. You can also remove this and generate a CRUD class for lines objects.

Class to manage partnership type

Class with cron tasks of Partnership module

API class for partnership partnership

Class to password field

Class to manage payments of donations

Class to manage payments of expense report

Class to manage payments of loans

Class to manage payments of salaries

Class to manage payments of social contributions

Class to manage payment terms records in dictionary

Class to manage payments of social contributions

Class to manage various payments

Class to phone field

Class PhpCollector

Class to point field

Class to polygon field

Class for Position

Class PositionLine. You can also remove this and generate a CRUD class for lines objects.

File of class to manage predefined price products or services by customer lines

Class for accessing price expression table

Class to price field

Class for accessing price global variables table

Class for price global variable updaters table

Class to parse product price expressions

Class to pricecy field (price with currency)

Parent class of emailing target selectors modules

Class to manage products or services

Class ProductAttribute Used to represent a Product attribute Examples:

  • Attribute 'color' (of type ProductAttribute) with values 'white', 'blue' or 'red' (each of type ProductAttributeValue).

Class ProductAttributeValue Used to represent a product attribute value

Class ProductCombination Used to represent the relation between a product and one of its variants.

Class ProductCombination2ValuePair Used to represent the relation between a variant and its attributes.

Class ProductCombinationLevel Used to represent a product combination Level

File of class to manage predefined price products or services by customer

Class to manage predefined suppliers products

Class for ProductFournisseurPrice

Class to manage products or services.

Class ProductStockEntrepot

Manage record for batch number management

Class with list of lots and properties

API class for Product lots

API class for products

Class to manage projects

Class to manage statistics on projects

API class for projects

Class to manage proposals

Class for PropalListController

Class to manage commercial proposal lines

Class to manage proposals statistics

Put here description of your class

Class to manage propal merge of product line

API class for orders

Class to radio field

Class to real field

Class to manage receptions

Class to manage table commandefournisseurdispatch

Class to manage reception statistics

API class for receptions

Class for RecruitmentCandidature

Class RecruitmentCandidatureLine. You can also remove this and generate a CRUD class for lines objects.

Class for RecruitmentJobPosition

API class for recruitment

Class for handler Reddit

Class to manage standing orders rejects

Class to manage cheque delivery receipts

Class to parse RSS files

Class to construct and send SMTP compliant email, even to a secure SMTP server, regardless of platform.

API class for salaries

Class to manage salary statistics

Class to manage salary payments

Class to select field

Class to sellist field

API class for dictionaries

Class for SharedDocumentsController

API class for shipments

Class to manage OpenID

Class for Skill

Class for SkillRank

Class for Skilldet

Class to manage Social network posts

Class to manage third parties objects (customers, suppliers, prospects...)

Class for SocieteAccount

Class to stars field

Parent class of statistics class

API that gives the status of the Dolibarr instance.

API class for stock movements

Class for StockTransfer

Class for StockTransferLine

Stripe class

Class to manage subscriptions of foundation members

API class for subscriptions

Class to manage line invoices

API class for supplier invoices

API class for supplier orders

Class to manage price ask supplier

Class to manage supplier_proposal lines

API class for supplier proposal

Class for Target

Class to manage tasks

Class to manage statistics on project tasks

API class for projects

Class to text field

API class for thirdparties

Class to manage ticket

Class to manage the ticket stats

API class for ticket object

Class for TimeSpent

Class to timestamp field

TraceableDB class

Class to manage translations

Class for

Tva

Class to manage VAT - Value-added tax (also known in French as TVA - Taxe sur la valeur ajoutée)

Class to url field

Class to manage Dolibarr users

Class to manage bank accounts description of users

Class to manage user groups

API class for users

Class to manage utility methods

Class toolbox to validate values

Class to varchar field

Class for ViewImageController

API class for warehouses

Class to manage fields

Class for WebPortalInvoice

Class for WebPortalMember

Class for WebPortalOrder

Class for WebPortalPartnership

Class for WebPortalPropal

Class WebPortalTheme

API class for webhooks

Class Website

Class Websitepage

\file htdocs/core/class/workboardresponse.class.php \brief Class that represents response of load_board functions

Class for Workstation

Class to link resource with Workstations

Class to link User groups and Workstations

API class for workstations

API class for zapier hook

Class to manage the box to show last manual entries

Class to manage the box to show suspense account

Class to manage the box to show last events

Class to manage the box to show events in future

Class to manage the box of customer activity (invoice, order, proposal)

Class to manage the box to show user birthdays

Class to manage the box to show members birthdays

Class to manage the box to show last modified BOMs

Class to manage the box to show bookmarks

Class to manage the box to show last customers

Class to manage the box to show last customer orders

Class to manage the box to show bank accounts

Class to manage the box to show last contacts

Class to manage the box to show last contracts

Class to manage the box to show last thirdparties

Class to manage the box to show last thirdparties

Class to manage the box to show RSS feeds

Class to manage the box to show last invoices

Class to manage the box to show last supplier invoices

Class to manage the box to show not paid suppliers invoices

Class to manage the box to show not paid sales invoices

Class to manage the box to show Fediverse posts

Class to manage the box to show last interventions

Class to manage the box to show last suppliers

Class to manage the box to show funnel of prospections

Class to manage the box to show top-selling customers

Class to manage the box to show invoices per month graph

Class to manage the box to show invoices per year graph

Class to manage the box to show last invoices

Class to manage the box to show new daily tickets

Class to manage the box to show number of ticket types

Class to manage the box

Class to manage the box to show orders per month graph

Class to manage the box to show last orders

Class to manage the box to show last invoices

Class to manage the box to show proposals per month graph

Class to manage the box

Class to manage the box

Class to manage the box

Class to manage the box to show last modified tickets

Class to manage the box to show last created tickets

Class to manage the box of last login

Class to manage the box to show (last modified) members by tags

Class to manage the box to show last modofied members

Class to manage the box to show last modified members

Class to manage the box to show last members subscriptions

Class to manage the box to show last modofied members

Class to manage the box to show last manufacturing orders (MO)

Class to manage the box to show last products

Class to manage the box to show too low stocks products

Class to manage the box to show last project

Class to manage the box to show project opportunities

Class to manage the box to show last proposals

Class to manage the box to show last prospects

Class to manage the box to show last contracted products/services lines

Class to manage the box to show last contracted products/services lines

Class to manage the box to show expired services

Class to manage the box to show last shipments

Class that manages the box showing latest supplier orders

Class to manage the box to show last supplier orders awaiting reception

Class to manage the box to show last task

Class to manage the box to show last projet

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to build documents using ODF templates generator

Class to manage Receipt Printers

Class to generate document for subscriptions

Class to generate document for a generic donations receipt

Class for compressed result

Class for lessjs

Class to manage a list of personalised recipients for mailing feature

Class to offer a selector of emailing targets from contacts

Class to manage a list of personalised recipients for mailing feature

Class to generate target according to rule Fraise

mailing_mailinglist_mymodule

Class to manage a list of personalised recipients for mailing feature

Class to offer a selector of emailing targets with Rule 'Pomme'.

Class to manage a list of personalised recipients for mailing feature

Class to offer a selector of emailing targets with Rule 'services expired'.

Class to offer a selector of emailing targets with Rule 'xinputfile'.

Class to offer a selector of emailing targets with Rule 'xinputuser'.

Class to describe and enable double entry accounting module

Class to describe and enable module Adherent

Class to describe and enable/disable module Agenda

Description and activation class for module Ai

Description and activation class for module Api

Description and activation class for module FixedAssets

Class to describe and enable module Banque

Class to describe Barcode

Class to describe a BlockedLog module

Description and activation class for module Bom

Description and activation class for module BookCal

Class to describe and enable module Bookmark

Class to generate a password according to a dolibarr standard rule (12 random chars)

Class to describe and enable module Categorie

Class to describe and enable module Click to Dial

Class to describe Websites module

Class to describe module Sales Orders

Class to describe and enable module Comptabilite

Class to describe and enable module Contrat

Class to describe a Cron module

Description and activation class for module datapolicy

Description and activation class for module dav

Class to describe and enable module

Class to describe and enable module Deplacement

Class to describe and enable module Document

Class to describe and enable module Donation

Class descriptor of DynamicPrices module

Description and activation class for module ECM

Description and activation class for module emailcollector

Description and activation class for module EventOrganization This module is base on this specification : https://wiki.dolibarr.org/index.php/Draft:Module_Event_Organization

Class to describe and enable module Expedition

Description and activation class for module ExpenseReport

Class to describe and enable module export

Class to describe and enable module externalrss

Description and activation class for module FTP

Class to describe module customer invoices

Class to describe and enable module Fckeditor

Class to describe and enable module Ficheinter

Description and activation class for module Fournisseur

Class to generate a password according to rule 'no password'

Class to generate a password according to personal rules

Class to generate a password according to a dolibarr standard rule (12 random chars)

Class to describe and enable module Import

Description and activation class for module Gravatar

Description and activation class for module HRM

Description and activation class for module holiday

Class to describe and enable module Import

Description and activation class for module MyModule

Description and activation class for module intracommreport

Description and activation class for module KnowledgeManagement

Class to describe and enable module Label

Class to describe and enable module Ldap

Class to manage loan module

Class to describe and enable module Mailing

Class to describe and enable module Click to Dial

Class to describe module Margin

Class to describe a ModuleBuilder module

Description and activation class for module Mrp

Description and activation class for module MyModule

Description and activation class for module MyModule

Class to describe and enable module Mailing

Class to describe and activate module OAuth

Description and activation class for module opensurvey

Description and activation class for module Partnership This module is base on this specification : https://wiki.dolibarr.org/index.php?title=Draft:Module_Partnership_management#Note

Description and activation class for module Paybox

Class to describe and enable module of payment by Bank transfer

Description and activation class for module Paypal

Class to generate barcode images using php barcode generator

Class to describe and enable module of payment by Direct Debit

Class to describe and activate module Direct Printing

Class descriptor of Product module

Description and activation class for module productdluo

Class to describe and enable module Projet

Class to describe and enable module Propale

Class to describe and activate module Receipt Printer

Class to describe and enable module Reception

Description and activation class for module Recruitment

Description and activation class for module Resource

Class to manage salaries module

Class to describe and enable module Service

Class to describe a SocialNetworks module

Class to describe and enable module Societe

Class to describe and enable module Stock

Description and activation class for module StockTransfer

Description and activation class for module Paybox

Description and activation class for module subtotals

Class to describe and enable module SupplierProposal

Class to enable/disable module Logs

Class to describe and enable module TakePos

Class to describe and enable module Tax

Class to generate barcode images using tcpdf barcode generator

Description and activation class for module Ticket

Class to describe and enable module User

Description and activation class for module Product variants

Description and activation class for module WebPortal

Class to describe a WebServices module

Description and activation class for module Webhook

Class to describe Websites module

Class to describe and enable module Workflow

Description and activation class for module Workstation

Description and activation class for module Zapier

Class to manage numbering of intervention cards with rule Arctic.

Class to manage customer Bom numbering rules advanced

Class to manage the Standard numbering rule for Asset

Class to manage barcode with standard rule

Class to manage barcode with standard rule

Class to manage customer Bom numbering rules advanced

Class to manage the Standard numbering rule for BOM

Class to manage Bookkeeping numbering rules Argon

Class to manage Bookkeeping numbering rules Helium, configurable numbering model

Class to manage numbering of thirdparties code

Class to manage cheque receipts numbering rules Mint

Class to manage cheque receipts numbering rules Thyme

Class to manage third party code with elephant rule

Class to manage numbering of thirdparties code

Class permettant la gestion monkey des codes tiers

Class to manage accountancy code of thirdparties with Aquarium rules

Class to manage accountancy code of thirdparties with Digitaria rules

Class to manage accountancy code of thirdparties with Panicum rules

Class to manage product code with elephant rule

\class mod_codeproduct_leopard \brief Class permettant la gestion leopard des codes produits

Class du modele de numerotation de reference de commande fournisseur Muguet

Class providing the 'Orchidee' numbering models for supplier orders

Class to manage Sales Order numbering rules Marbre

Class to manage Sales Order numbering rules Saphir

Class to manage contract numbering rules Magre

Class to manage contract numbering rules Olive

Class to manage contract numbering rules Serpis

\class mod_delivery_jade \brief Class du modele de numerotation de reference de bon de livraison Jade

\class mod_delivery_saphir \brief Class du modele de numerotation de reference de livraison Saphir

Class to manage customer evaluation numbering rules advanced

Class to manage the Standard numbering rule for HR evaluation

Class to manage expedition numbering rules Ribera

Class to manage expedition numbering rules Safor

Class to manage expensereport numbering rules Jade

Class to manage expense report numbering rules Sand

Cactus Class of numbering models of suppliers invoices references

\class mod_facture_fournisseur_tulip \brief Tulip Class of numbering models of suppliers invoices references

Class to manage invoice numbering rules Mars

Class of numbering module Mercure for invoices

Class of numbering module Terre for invoices

Class to manage holiday numbering rules Immaculate

Class to manage holiday numbering rules Madonna

Class to manage customer Bom numbering rules advanced

Class to manage the knowledgerecord numbering rules standard

Class to manage Batch numbering rules advanced

\class mod_lot_free \brief Class allowing lot_free management of batch numbers

Class to manage MO numbering rules standard

Class to manage the numbering module Advanced for member references

Class to manage member report numbering rules Custom

Class to manage the numbering module Simple for member references

Class to manage MO numbering rules advanced

Class to manage MO numbering rules standard

Class to manage the Advanced numbering rule for MyObject

Class to manage the Standard numbering rule for MyObject

Class to manage numbering of intervention cards with rule Pacific.

Class to manage the Advanced numbering rule for Partnership

Class to manage the Standard numbering rule for Partnership

Class to manage customer payment numbering rules Ant

Class to manage customer payment numbering rules Cicada

Class to manage the numbering module Simple for project references

Class to manage the numbering module Universal for project references

Class to manage business proposition rules Marbre

Class of file that contains the numbering module rules Saphir

Class to manage reception numbering rules Beryl

Class to manage reception numbering rules Moonstone

Class to manage the Advanced numbering rule for Job application

Class to manage the Standard numbering rule for Job application

Class to manage the Advanced numbering rule for Job position

Class to manage the Standard numbering rule for Job positions

Class to manage Batch numbering rules advanced

\class mod_codeproduct_leopard \brief Class permettant la gestion leopard des codes produits

Class to manage MO numbering rules standard

Class to manage customer Bom numbering rules advanced

Class to manage the Standard numbering rule for Stock

Class to manage customer payment numbering rules Ant

Class to manage customer payment numbering rules Cicada

Class to manage the Marbre numbering rule for Request for quotation

Class of file that contains the numbering module rules Saphir

Class to manage logging to a file

Class to manage logging to syslog

Class to manage ref numbering of takepos cards with rule Simple.

Class to manage ref numbering of takepos cards with rule universal.

Class to manage the numbering module Simple for project references

Class du modele de numerotation de reference de projet Universal

Class to manage the numbering module Simple for ticket references

Class to manage the numbering module Universal for Ticket references

Class to manage customer Bom numbering rules advanced

Class to manage the Standard numbering rule for Workstation

Class to manage the box

Class to make SSL connection

Class to generate PDF supplier proposal Aurore

Class to generate PDF proposal Azur

Class to build sending documents with model Espadon

Class to manage generation of project document Baleine

Class permettant de generer les projects au modele Ban

Class to manage generation of project document Beluga

Class to build sending documents with model Espadon

Class to generate the supplier invoices PDF with the template canelle

Class to generate the supplier orders with the cornas model

Class to generate the customer invoice PDF with template Crabe

Class to generate PDF proposal Cyan

Class to build sending documents with model Eagle

Class to generate PDF orders with template Eagle

Class to generate PDF orders with template Einstein

Class to generate PDF orders with template Eratosthene

Class to build sending documents with model Espadon

Class to build sending documents with model Espadon

Class to build sending documents with model Merou

Class to generate the supplier orders with the muscadet model

Class to manage PDF invoice template octopus

Class to manage reporting of payments

Class permettant de generer les rapports de paiement

Class to generate PDF orders with template Proforma

Class to build sending documents with model Rouget

Class to generate SEPA mandate

Class to build interventions documents with model Soleil

Class to manage PDF invoice template sponge

Class permettant de generer les borderaux envoi au modele Squille

Class to build documents using ODF templates generator

Class to generate event report

Class to manage PDF template standard_asset

Class to generate Evaluation Pdf based on standard model

Class to generate expense report based on standard model

Class to generate stick sheet with format Avery or other personalised

Class to build documents using ODF templates generator

Class to manage PDF template standard_myobject

Class to manage PDF template standard_recruitmentjobposition

Class to build documents using ODF templates generator

Class to generate the supplier invoices payment file with the standard model

Class to generate stick sheet with format Avery or other personalised

Class to build Delivery Order documents with storm model

Class to build contracts documents with model Strato

Class to generate stick sheet with format Avery or other personalised

Class to manage generation of project document Timespent

Class to build Delivery Order documents with typhon model

Class to generate the manufacturing orders with the vinci model

Class to generate the supplier proposals with the zenith model

Class to provide printing with Google Cloud Print

Class to provide printing with PrintIPP

Class to build vCard files

Interfaces

Class to manage Dolibarr database access for an SQL database

Functions

Activate($value, $withdeps = 1)

Enable a module

array
AssetsAdminPrepareHead()

Prepare admin pages header

AssetsPrepareHead()

No description

CalEncode($line)

\brief Cut string after 75 chars. Add CRLF+Space.

CallSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL, $tag, $solutionType, $landingPage, $shipToName, $shipToStreet, $shipToCity, $shipToState, $shipToCountryCode, $shipToZip, $shipToStreet2, $phoneNum)

No description

CheckES($IentOfi, $InumCta)

Returns the key for Spanish Banks Accounts

string
CombinePaths(string $sBasePath, string $sFolder)

CombinePaths

ConfirmPayment($token, $paymentType, $currencyCodeType, $payerID, $ipaddress, $FinalPaymentAmt, $tag)

No description

ConvertSecondToTime($iSecond, $format = 'all', $lengthOfDay = 86400)

Return, in clear text, value of a number of seconds in days, hours and minutes

ConvertTime2Seconds($iHours = 0, $iMinutes = 0, $iSeconds = 0)

Converti les heures et minutes en secondes

string
ConvertToXmlAttribute(string $value)

ConvertToXmlAttribute

void
CreateFolder(string $resourceType, string $currentFolder)

Create folder

string
CreateServerFolder(string $folderPath, ?string $lastFolder = null)

CreateServerFolder

void
CreateXmlFooter()

CreateXmlFooter

void
CreateXmlHeader(string $command, string $resourceType, string $currentFolder)

CreateXmlHeader

bool|-1
DetectHtml(string $filePath)

Detect HTML in the first KB to prevent against potential security issue with IE/Safari/Opera file type auto detection bug.

DirectPayment($paymentType, $paymentAmount, $creditCardType, $creditCardNumber, $expDate, $cvv2, $firstName, $lastName, $street, $city, $state, $zip, $countryCode, $currencyCode, $tag)

No description

void
DisplayJob($object)

Show the top of the page including informations of a job

void
DisplayPositionCard($object)

Show the card of a position

DisplayPositionList()

Show a list of positions for the current job

void
DoResponse()

DoResponse

never
FileUpload(string $resourceType, string $currentFolder, string $sCommand, string $CKEcallback = '')

FileUpload

bool
FindBadUtf8(string $string)

FindBadUtf8

GETPOST(string $paramname, $check = 'alphanohtml', $method = 0, $filter = null, $options = null, $noreplace = 0)

Return value of a param into GET or POST supervariable.

int|string
GETPOSTDATE(string $prefix, string $hourTime = '', int|string $gm = 'auto', string $saverestore = '')

Helper function that combines values of a dolibarr DatePicker (such as Form::selectDate) for year, month, day (and optionally hour, minute, second) fields to return a timestamp.

GETPOSTFLOAT(string $paramname, ""|"MU"|"MT"|"MS"|"CU"|"CT"|int $rounding = '', $option = 2)

Return the value of a $_GET or $_POST supervariable, converted into float.

GETPOSTINT(string $paramname, $method = 0)

Return the value of a $_GET or $_POST supervariable, converted into integer.

bool
GETPOSTISARRAY(string $paramname, int<0, 3> $method = 0)

Return true if the parameter $paramname is submit from a POST OR GET as an array.

bool
GETPOSTISSET(string $paramname)

Return true if we are in a context of submitting the parameter $paramname from a POST of a form.

array<string, array<string, string>>
GetContentPolicyDirectives()

Prepare array of directives for HTTP headers

array<string, array<string, array<string, string>>>
GetContentPolicySources()

Prepare array of sources for HTTP headers

array<string, array<string|int, array<string|int, string>|string>>
GetContentPolicyToArray(string $forceCSP)

Transform a Content Security Policy to an array

string
GetCurrentFolder()

GetCurrentFolder

GetDetails($token)

No description

void
GetFolders(string $resourceType, string $currentFolder)

GetFolders

void
GetFoldersAndFiles(string $resourceType, string $currentFolder)

GetFoldersAndFiles

string
GetLegendSkills()

No description

string
GetParentFolder(string $folderPath)

GetParentFolder

string
GetResourceTypeDirectory(string $resourceType, string $sCommand)

GetResourceTypeDirectory

string
GetResourceTypePath(string $resourceType, string $sCommand)

GetResourceTypePath

string
GetRootPath()

Get Root Path

string
GetUrlFromPath(string $resourceType, string $folderPath, string $sCommand)

GetUrlFromPath

bool
IsAllowedCommand(string $sCommand)

IsAllowedCommand

bool
IsAllowedExt(string $sExtension, string $resourceType)

Is Allowed Extension

bool
IsAllowedType(string $resourceType)

Is Allowed Type

bool
IsHtmlExtension(string $ext, string[] $formExtensions)

Check whether given extension is in html extensions list

bool|-1
IsImageValid(string $filePath, string $extension)

Check file content.

PLineSelect(mixed $inc, mixed $parent, mixed $lines, mixed $level = 0, $selectedtask = 0, $selectedproject = 0)

Write all lines of a project (if parent = 0)

PLines(mixed $inc, mixed $parent, mixed $lines, mixed $level, mixed $var, mixed $showproject, mixed $taskrole, mixed $projectsListId = '')

Show task lines with a particular parent

PLinesb($inc, $parent, $lines, $level, $projectsrole, $tasksrole, $mytask = 0)

Enter description here.

array
PositionCardPrepareHead(Position $object)

Prepare array of tabs for positions

QPDecode($str)

No description

QPEncode($str, $forcal = 0)

No description

string
RemoveExtension(string $fileName)

RemoveExtension

string
RemoveFromEnd(string $sourceString, string $charToRemove)

RemoveFromEnd

string
RemoveFromStart(string $sourceString, string $charToRemove)

RemoveFromStart

string
SanitizeFileName(string $sNewFileName)

Do a cleanup of the file name to avoid possible problems

string
SanitizeFolderName(string $sNewFolderName)

Do a cleanup of the folder name to avoid possible problems

int
SearchTaskInChild(mixed $inc, mixed $parent, mixed $lines, mixed $taskrole)

Search in task lines with a particular parent if there is a task for a particular user (in taskrole)

void
SendCKEditorResults(string $callback, string $sFileUrl, string $customMsg = '')

SendCKEditorResults

never
SendError(int $number, string $text)

SendError

string
SendErrorNode(int $number, string $text)

SendErrorNode

never
SendUploadResults(string $errorNumber, string $fileUrl = '', string $fileName = '', string $customMsg = '')

This is the function that sends the results of the uploading process.

string
ServerMapFolder(string $resourceType, string $folderPath, string $sCommand)

ServerMapFolder

string
Server_MapPath($path)

Emulate the asp Server.mapPath function.

void
SetXmlHeaders()

SetXmlHeaders

UnActivate($value, $requiredby = 1)

Disable a module

void
_createStatusBadgeCss(string $statusName, string $statusVarNamePrefix = '', string $commentLabel = '', string $cssPrefix = '')

Create status badge

bool
_isInBoxList(int $idrss, array $boxlist)

Check if the given RSS feed if inside the list of boxes/widgets

bool
_isInBoxListFediverse(int $id, array $boxlist)

Check if the given fediverse feed if inside the list of boxes/widgets

void
_printInputFormPart(string $confkey, bool $title = false, string $desc = '', array $metas = array(), string $type = 'input', bool $help = false)

Print a form part

void
_printOnOff(string $confkey, bool $title = false, string $desc = '')

Print a On/Off button

string
_unval(string $val)

Return text according to type

void
_updateBtn()

Print an update button

string
_val(mixed $val)

Return text according to type

int
acceptLocalLinktoMedia()

Check the syntax of some PHP code.

accessforbidden(string $message = '', int<0, 1> $printheader = 1, $printfooter = 1, $showonlymessage = 0, $params = null)

Show a message to say access is forbidden and stop program.

array<array{0: string, 1: string, 2: string}>
account_statement_prepare_head(CommonObject $object, string $num)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
accounting_prepare_head(AccountingAccount $object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
accounting_transaction_prepare_head(BookKeeping $object, string $mode = '', string $type = '', string $backtopage = '/accountancy/bookkeeping/listbyaccount.php')

Prepare array with list of tabs for accounting transaction

action_create($db, object $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)

Create an product document on disk using template defined into PRODUCT_ADDON_PDF

array<array{0: string, 1: string, 2: string}>
actions_prepare_head(object $object)

Prepare array with list of tabs

activateModule($value, int $withdeps = 1, $noconfverification = 0)

Enable a module

int
activateModulesRequiredByCountry($country_code)

Activate external modules mandatory when country is country_code

string
activitytrim($product_type)

Print html activity for product type

int
addDocumentModel(string $name, string $type, string $label = '', string $description = '')

Add document model used by doc generator

addEventTypeSQL($sql, string $actioncode, $sqlANDOR = "AND")

Add Event Type SQL

int
addFileIntoDatabaseIndex(string $dir, $file, $fullpathorig = '', $mode = 'uploaded', $setsharekey = 0, $object = null, $forceFullTextIndexation = '')

Add a file into database index.

addMailingEventTypeSQL($actioncode, object $objcon, $filterobj)

Add Mailing Event Type SQL

int<-1, 1>
addObjectsToApiFile(string $srcfile, string $file, string[] $objects, string $modulename)

Add Object in ModuleApi File

addOtherFilterSQL($sql, string $donetodo, $now, $filters)

Add more SQL filters for event list

void
addPartToArray(object $obj, string $partno, array $part_array)

Sub function for createPartArray(). Only called by createPartArray() and itself.

void
addSummaryTableLine(int $tableColumnCount, int $num, int $nbofloop = 0, int $total = 0, string $noneWord = "None", bool $extraRightColumn = false)

Add a summary line to the current open table ("None", "XMoreLines" or "Total xxx")

array<array{0: string, 1: string, 2: string}>
adminProductAttributePrepareHead()

Prepare array with list of tabs

array
admin_accounting_prepare_head(AccountingAccount $object = null)

Prepare array with list of admin tabs

array<array{0: string, 1: string, 2: string}>
agenda_prepare_head()

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
aiAdminPrepareHead()

Prepare admin pages header

string
ajax_autocompleter(string|int $selected, string|int $htmlname, string $url, string $urloption = '', int $minLength = 2, int $autoselect = 0, array<string, string|string[]> $ajaxoptions = array(), string $moreparams = '')

Generic function that return javascript to add to transform a common input text or select field into an autocomplete field by calling an Ajax page (ex: /societe/ajax/ajaxcompanies.php).

string
ajax_autoselect(string $htmlname, string $addlink = '', string $textonlink = 'Link')

Make content of an input box selected when we click into input field.

string
ajax_combobox(string $htmlname, array<array{method: string, url: string, htmlname: string, params?: array<string, string>}> $events = array(), int<0, max> $minLengthToAutocomplete = 0, int<0, 1> $forcefocus = 0, "resolve"|"off" $widthTypeOfAutocomplete = 'resolve', string $idforemptyvalue = '-1', string $morecss = '')

Convert a html select field into an ajax combobox.

ajax_constantonoff($code, array<string, string[]> $input = array(), $entity = null, $revertonoff = 0, $strict = 0, $forcereload = 0, $marginleftonlyshort = 2, $forcenoajax = 0, $setzeroinsteadofdel = 0, $suffix = '', $mode = '', $morecss = 'inline-block', $userconst = 0, $showwarning = '', $disabled = 0)

On/off button for constant

string
ajax_dialog(string $title, string $message, int $w = 350, int $h = 150)

Show an ajax dialog

string
ajax_event(string $htmlname, array<array{method: string, url: string, htmlname: string, params: array<string, string>}> $events)

Add event management script.

string
ajax_multiautocompleter(string $htmlname, string[] $fields, string $url, string $option = '', int $minLength = 2, int $autoselect = 0)

Generic function that return javascript to add to a page to transform a common input text field into an autocomplete field by calling an Ajax page (ex: core/ajax/ziptown.php).

ajax_object_onoff($object, string $code, $field, $text_on, $text_off, $input = array(), $morecss = '', $htmlname = '', $forcenojs = 0, $moreparam = '', $readonly = 0)

On/off button to change a property status of an object This uses the ajax service objectonoff.php (May be called when MAIN_DIRECT_STATUS_UPDATE is set for some pages)

void
ajouter_sondage()

Add a poll

bool
analyseVarsForSqlAndScriptsInjection(string|array<int|string, string> $var, int<0, 3> $type, int<0, 1> $stopcode = 1)

Return true if security check on parameters are OK, false otherwise.

analyse_sql_and_script($var, $get)

No description

api_admin_prepare_head()

Return array head with list of tabs to view object information.

bool
archiveOrBackupFile(string $srcfile, int $max_versions = 5, string $archivedir = '', string $suffix = "v", string $moveorcopy = 'move')

Manage backup versions for a given file, ensuring only a maximum number of versions are kept.

array2table($data, int $tableMarkup = 1, $tableoptions = '', $troptions = '', $tdoptions = '')

Return an html table from an array

array2tr($data, string $troptions = '', $tdoptions = '')

Return lines of an html table from an array Used by array2table function only

array<int|string, array{label?: string, example1?: string, required?: bool, imported?: bool|int<0, 1>, position?: int}>
arrayInsert(array<int|string, array{label?: string, example1?: string, required?: bool, imported?: bool|int<0, 1>, position?: int}> $array, int $position, array{label?: string, example1?: string, required?: bool, imported?: bool|int<0, 1>, position?: int} $insertArray)

Return array with element inserted in it at position $position

array
array_merge_recursive_distinct(array $array1, array $array2)

Recursively merges two arrays while preserving keys and replacing existing values.

bool
ascii_check($str)

Check if a string is in ASCII

array<array{0: string, 1: string, 2: string}>
assetAdminPrepareHead()

Prepare admin pages header

array<array{0: string, 1: string, 2: string}>
assetModelPrepareHead(AssetModel $object)

Prepare array of tabs for AssetModel

array<array{0: string, 1: string, 2: string}>
assetPrepareHead(Asset $object)

Prepare array of tabs for Asset

array
asset_admin_prepare_head()

Prepare admin pages header

array
asset_prepare_head(Asset $object)

Prepare admin pages header

array
asset_type_prepare_head(AssetType $object)

Return array head with list of tabs to view object informations

string
autoOrManual(string $automaticmanual, int $case = 1, int $color = 0)

Return automatic or manual in current language

array<array{0: string, 1: string, 2: string}>
availabilitiesPrepareHead(Availabilities $object)

Prepare array of tabs for Availabilities

backup_tables($outputfile, $tables = '*')

Backup the db OR just a table without mysqldump binary (does not require any exec permission) Author: David Walsh (http://davidwalsh.name/backup-mysql-database-php) Updated and enhanced by Stephen Larroque (lrq3000) and by the many commentators from the blog Note about foreign keys constraints: for Dolibarr, since there are a lot of constraints and when imported the tables will be inserted in the dumped order, not in constraints order, then we ABSOLUTELY need to use SET FOREIGN_KEY_CHECKS=0; when importing the sql dump.

array<array{0: string, 1: string, 2: string}>
bank_admin_prepare_head(CommonObject $object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
bank_prepare_head(Account $object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
bank_report_prepare_head(Account $object)

Prepare array with list of tabs for bank report

array<array{0: string, 1: string, 2: string}>
bankline_prepare_head(int $id)

Returns an array with the tabs for the "Bannkline" section It loads tabs from modules looking for the entity payment

array{encoding: string, bars: string, text: string}|false
barcode_encode(string $code, string $encoding)

Encodes $code with $encoding using genbarcode OR built-in encoder if you don't have genbarcode only EAN-13/ISBN or UPC is possible

array{encoding: string, bars: string, text: string, error: string}|array{text: string, error: string}
barcode_encode_ean(string $ean, string $encoding = "EAN-13")

Encode EAN

array{encoding: string, bars: string, text: string}|false
barcode_encode_genbarcode(string $code, string $encoding)

Encode result of genbarcode command

array{encoding: string, bars: string, text: string, error: string}|array{text: string, error: string}
barcode_encode_upc(string $upc, string $encoding = "UPC")

Encode UPC

string
barcode_gen_ean_bars(string $ean)

Generate EAN bars

int<0, 9>
barcode_gen_ean_sum(string $ean)

Calculate EAN sum

void
barcode_outimage(string $text, string $bars, int<1, max> $scale = 1, string $mode = "png", int $total_y = 0, array{}|array{top: int, bottom: int, left: int, right: int} $space = [], string $filebarcode = '')

Output image onto standard output, or onto disk if $filebarcode is defined

array{encoding: string, bars: string, text: string}|string
barcode_print(string $code, string $encoding = "ANY", int<1, max> $scale = 2, string $mode = "png", string $filebarcode = '')

Print barcode

string
binhex(string $bin, bool $pad = false, bool $upper = false)

Convert a binary data to string that represent hexadecimal value

array<array{0: string, 1: string, 2: string}>
blockedlogadmin_prepare_head($withtabsetup)

Define head array for tabs of blockedlog tools setup pages

array<array{0: string, 1: string, 2: string}>
bomAdminPrepareHead()

Prepare admin pages header

array<array{0: string, 1: string, 2: string}>
bomPrepareHead(BOM $object)

Prepare array of tabs for BillOfMaterials

array<array{0: string, 1: string, 2: string}>
bon_prelevement_prepare_head(BonPrelevement $object, int $nbOfInvoices, $nbOfSalaryInvoice)

Return array head with list of tabs to view object information

array<array{0: string, 1: string, 2: string}>
bookcalAdminPrepareHead()

Prepare admin pages header

array
bookingPrepareHead(Booking $object)

Prepare array of tabs for Booking

string
buildParamDate(string $prefix, ?int $timestamp = null, string $hourTime = '', string $gm = 'auto')

Helper function that combines values of a dolibarr DatePicker (such as Form::selectDate) for year, month, day (and optionally hour, minute, second) fields to return a portion of URL reproducing the values from the current HTTP request.

build_calfile($format, string $title, $desc, $events_array, $outputfile)

Build a file from an array of events All input params and data must be encoded in $conf->charset_output

int<-1, 1>
build_exportfile(string $format, string $type, int $cachedelay, string $filename, array<string, int|string> $filters)

Export events from database into a cal file.

build_rssfile(string $format, $title, $desc, $events_array, $outputfile, $filter = '', $url = '', $langcode = '')

Build a file from an array of events.

calEncode(string $line)

Cut string after 75 chars. Add CRLF+Space.

calcul_price_total(float $qty, $pu, $remise_percent_ligne, $txtva, $uselocaltax1_rate, $uselocaltax2_rate, $remise_percent_global, $price_base_type, $info_bits, $type, $seller = null, $localtaxes_array = [], $progress = 100, $multicurrency_tx = 1, $pu_devise = 0, $multicurrency_code = '')

Calculate totals (net, vat, ...) of a line.

string
calculate_byte($byt)

Calculate Bytes to kb, mb and translate it to current language

array<array{0: string, 1: string, 2: string}>
calendarPrepareHead(Calendar $object)

Prepare array of tabs for Calendar

array<array{0: string, 1: string, 2: string}>
calendars_prepare_head($param)

Define head array for tabs of agenda setup pages

array<string, string>
callSetExpressCheckout(float $paymentAmount, string $currencyCodeType, string $paymentType, string $returnURL, string $cancelURL, string $tag, string $solutionType, string $landingPage, string $shipToName, string $shipToStreet, string $shipToCity, string $shipToState, string $shipToCountryCode, string $shipToZip, string $shipToStreet2, string $phoneNum, string $email = '', string $desc = '')


Purpose: Prepares the parameters for the SetExpressCheckout API Call.

bool
canApplySubtotalOn(string $tablename)

Return if we should do a group by customer with sub-total

bool
canDisplayLinkedObjectInPDF(object $object, object $elementobject)

Check if a linked object can be displayed based on third-party privacy rules.

array<array<string, string>>
cartesianArray(array $input)

Applies the Cartesian product algorithm to an array Source: http://stackoverflow.com/a/15973172

array<array{0: string, 1: string, 2: string}>
categories_prepare_head(Categorie $object, string $type)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
categoriesadmin_prepare_head()

Prepare array with list of tabs

bool
checkBanForAccount($account)

Check account number information for a bank account

checkES($IentOfi, string $InumCta)

Returns the key for Spanish Banks Accounts

checkElementExist($id, string $table)

Check if an element exist

int
checkExistComment(string $file, int<0, 2> $number)

Function to check if comment BEGIN and END exists in modMyModule class

bool
checkGeneralAccountAllowsAuxiliary(DoliDB $db, string $general_account, string $auxiliary_account, int $general_account_id = 0)

Check if a general accounting account allows the use of an auxiliary account.

checkIbanForAccount($account = null, ?string $ibantocheck = null)

Check IBAN number information for a bank account.

string
checkLinkedElements(string $sourcetype, string $targettype)

Check linked elements and delete if invalid

checkLoginPassEntity(string $usertotest, string $passwordtotest, int|string $entitytotest, string[] $authmode, "api"|"dav"|"ws"|"" $context = '')

Return a login if login/pass was successful

int
checkNbPostsForASpeceificIp(object $object, int $nb_post_max)

Check if the object exceeded the number of posts for a specific ip in the same week

checkPHPCode($phpfullcodestringold, $phpfullcodestring)

Check a new string containing only php code (including <php tag)

  • Block if user has no permission to change PHP code.

checkSwiftForAccount($account = null, ?string $swift = null)

Check SWIFT information for a bank account

bool
checkUserAccessToObject(User $user, array $featuresarray, int|string|object $object = 0, string $tableandshare = '', string[]|string $feature2 = '', string $dbt_keyfield = '', string $dbt_select = 'rowid', string $parenttableforentity = '')

Check that access by a given user to an object is ok.

string
checkVATGR(string $username, string $password, string $AFMcalledby, string $AFMcalledfor)

Request VAT details

checkVal($out = '', string $check = 'alphanohtml', $filter = null, $options = null)

Return a sanitized or empty value after checking value against a rule.

check_authentication($authentication, int $error, $errorcode, $errorlabel)

Check authentication array and set error, errorcode, errorlabel

string
check_user_password_dolibarr(string $usertotest, string $passwordtotest, int $entitytotest = 1)

Check validity of user/password/entity If test is ko, reason must be filled into $_SESSION["dol_loginmesg"] Note: On critical error (hack attempt), we put a log "functions_dolibarr::check_user_password_dolibarr authentication KO"

string
check_user_password_empty(string $usertotest, string $passwordtotest, int $entitytotest)

Check validity of user/password/entity If test is ko, reason must be filled into $_SESSION["dol_loginmesg"]

string
check_user_password_forceuser(string $usertotest, string $passwordtotest, int $entitytotest)

Check validity of user/password/entity If test is ko, reason must be filled into $_SESSION["dol_loginmesg"]

string
check_user_password_googleoauth(string $usertotest, string $passwordtotest, int $entitytotest)

Check validity of user/password/entity If test is ko, reason must be filled into $_SESSION["dol_loginmesg"]

string
check_user_password_http(string $usertotest, string $passwordtotest, int $entitytotest)

Check validity of user/password/entity If test is ko, reason must be filled into $_SESSION["dol_loginmesg"]

string
check_user_password_ldap(string $usertotest, string $passwordtotest, int $entitytotest)

Check validity of user/password/entity If test is ko, reason must be filled into $_SESSION["dol_loginmesg"]

string|false
check_user_password_openid(string $usertotest, string $passwordtotest, int $entitytotest)

Check validity of user/password/entity If test is ko, reason must be filled into $_SESSION["dol_loginmesg"]

string|false
check_user_password_openid_connect(string $usertotest, string $passwordtotest, int $entitytotest)

Check validity of user/password/entity If test is ko, reason must be filled into $_SESSION["dol_loginmesg"]

int|string
check_value(string $mask, string $value)

Check value

int
chequereceipt_pdf_create($db, int $id, string $message, string $modele, Translate $outputlangs)

Cree un bordereau remise de cheque

chiffre_en_lettre($montant, $devise1 = '', $devise2 = '')

No description

object
cleanAgendaEventsDatas(object $toclean)

Clean sensible object datas

int
cleanCorruptedTree(DoliDB $db, string $tabletocleantree, string $fieldfkparent)

Clean corrupted database tree (orphelins linked to a not existing parent), record linked to themself, and also child-parent loop

object
cleanObjectDatas(object $toclean)

Clean sensible object datas

string
cleanSecurityCSP(string $securitycsp)

Function to fix a bad security CSP string

string
clean_account(string $account)

Return accounting account without zero on the right

int
clean_data_ecm_directories()

Clean data into ecm_directories table

int
clean_orphelins(mixed $db)

Clean task not linked to a parent

string
clean_url(string $url, int $http = 1)

Clean an url string

string
cleansep(string $value)

Clean a string from separator

string
colorAdjustBrightness(string $hex, int $steps)

No description

string
colorAgressiveness(string $hex, int $ratio = -50, int $brightness = 0)

Change color to make it less aggressive (ratio is negative) or more aggressive (ratio is positive)

colorArrayToHex(array{0: int, 1: int, 2: int} $arraycolor, $colorifnotfound = '888888')

Convert an array with RGB value into hex RGB value.

string
colorDarker(string $hex, int $percent)

No description

array{h: float, l: float, s: float, a: int|float}|string
colorHexToHsl(string $hex, float|false $alpha = false, bool $returnArray = false)

Color Hex to Hsl (used for style)

string|array{r: int, g: int, b: int, a?: float}
colorHexToRgb(string $hex, float|false $alpha = false, bool $returnArray = false)

No description

int<-1, 1>
colorIsLight($stringcolor)

Return true if the color is light

string
colorLighten(string $hex, int $percent)

No description

colorStringToArray(string|array{0: int, 1: int, 2: int} $stringcolor, $colorifnotfound = array(88, 88, 88))

Convert a string RGB value ('FFFFFF', '255,255,255') into an array RGB array(255,255,255).

bool
colorValidateHex(string $color, bool $allow_white = true)

No description

string
coloredText(string $text, string $color, bool $bold = false)

Output text in color or bold

commande_pdf_create(DoliDB $db, Commande $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)

Create a document onto disk accordign to template module.

array<array{0: string, 1: string, 2: string}>
commande_prepare_head(Commande $object)

Prepare array with list of tabs

array<string, string>
commonHtmlAttributeBuilder(array<string, string|int|float|null|bool> $attr, array $unescapedAttr = [])

Builds an array of safe and properly escaped HTML attributes from a key-value pair list.

array<array{0: string, 1: string, 2: string}>
company_admin_prepare_head()

Return array head with list of tabs to view object information.

int
compare(array $x, array $y)

Compare revisions

int<-1, 1>
compareFirstValue(int|string $a, int|string $b)

Compare two values

int
compareIdAsc(stdClass $a, stdClass $b)

Compare two modules by their ID for a ascending order

int
compareIdDesc(stdClass $a, stdClass $b)

Compare two modules by their ID for a descending order

int
comparePermissionIdsAsc(stdClass $a, stdClass $b)

Compare two modules by their ID for a ascending order

int
comparePermissionIdsDesc(stdClass $a, stdClass $b)

Compare two modules by their permissions for a descending order

void
completeFileArrayWithDatabaseInfo(array<array{name: string, path: string, level1name: string, relativename: string, fullname: string, date: string, size: int, perm: int, type: string}> $filearray, string $relativedir, ?object $object = null)

Complete $filearray with data from database.

complete_dictionary_with_modules(int[] $taborder, $tabname, $tablib, $tabsql, $tabsqlsort, $tabfield, $tabfieldvalue, $tabfieldinsert, $tabrowid, $tabcond, $tabhelp, $tabcomplete)

Add external modules to list of dictionaries.

int
complete_elementList_with_modules($elementList)

Search external modules to complete the list of contact element

void
complete_head_from_modules(Conf $conf, $langs, $object, $head, $h, $type, $mode = 'add', $filterorigmodule = '')

Complete or removed entries into a head array (used to build tabs).

complete_substitutions_array(array<string, string|float|null> $substitutionarray, $outputlangs, $object = null, $parameters = null, $callfunc = "completesubstitutionarray")

Complete the $substitutionarray with more entries coming from external module that had set the "substitutions=1" into module_part array.

int
conf(string $dolibarr_main_document_root)

Load conf file (file must exists)

array<array{0: string, 1: string, 2: string}>
conferenceorboothAttendeePrepareHead(ConferenceOrBoothAttendee $object)

Prepare array of tabs for ConferenceOrBoothAttendees

array<array{0: string, 1: string, 2: string}>
conferenceorboothPrepareHead(ConferenceOrBooth $object, int $with_project = 0)

Prepare array of tabs for ConferenceOrBooth

array<array{0: string, 1: string, 2: string}>
conferenceorboothProjectPrepareHead(Project $object)

Prepare array of tabs for ConferenceOrBooth Project tab

array
conferenceorboothattendeePrepareHead(ConferenceOrBoothAttendee $object)

Prepare array of tabs for ConferenceOrBoothAttendees

array<string, string>
confirmPayment(string $token, string $paymentType, string $currencyCodeType, string $payerID, string $ipaddress, string $FinalPaymentAmt, string $tag)

Validate payment

void
constructGanttLine(array<int, array{task_id: int, task_alternate_id: int, task_name: string, task_resources: string, task_start_date: int, task_end_date: int, task_is_group: int<0, 1>, task_position: int, task_css: string, task_milestone: int, task_parent: int, task_parent_alternate_id: int}> $tarr, array{task_id: int, task_alternate_id: int, task_name: string, task_resources: string, task_start_date: int, task_end_date: int, task_is_group: int<0, 1>, task_position: int, task_css: string, task_milestone: int, task_parent: int, task_parent_alternate_id: int} $task, int[][] $task_dependencies, int $level = 0, int $project_id = null)

Add a gantt chart line

array<array{0: string, 1: string, 2: string}>
contact_prepare_head(Contact $object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
contract_admin_prepare_head()

Return array head with list of tabs to view object information.

contract_pdf_create(DoliDB $db, Contrat $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
deprecated

Create a contract document on disk using template defined into CONTRACT_ADDON_PDF

array<array{0: string, 1: string, 2: string}>
contract_prepare_head(Contrat $object)

Prepare array with list of tabs

convertDurationtoHour($duration_value, string $duration_unit)

Convert duration to hour

convertSecondToTime(int $iSecond, $format = 'all', $lengthOfDay = 86400, $lengthOfWeek = 7)

Return, in clear text, value of a number of seconds in days, hours and minutes.

int
convertTime2Seconds(int $iHours = 0, int $iMinutes = 0, int $iSeconds = 0)

Convert hours and minutes into seconds

bool
correctExifImageOrientation(string $fileSource, string|bool|null $fileDest, int<-1, 100> $quality = 95)

Add exif orientation correction for image

int|false
countItemsInDirectory(string $path, int<1, 2> $type = 1)

count directories or files in modulebuilder folder

array{result: array{result_code: string, result_label: string}}
createActionComm(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: string, ref: string, ref_ext: string, type_id: string, type_code: string, type: string, label: string, datep: int, datef: int, datec: int, datem: int, note: string, percentage: string, author: string, usermod: string, userownerid: string, priority: string, fulldayevent: string, location: string, socid: string, contactid: string, projectid: string, fk_element: string, elementtype: string} $actioncomm)

Create ActionComm

array{result: array{result_code: string, result_label: string}}
createContact(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: string, ref_ext: string, lastname: string, firstname: string, address: string, zip: string, town: string, state_id: string, state_code: string, state: string, country_id: string, country_code: string, country: string, socid: string, status: string, phone_pro: string, fax: string, phone_perso: string, phone_mobile: string, code: string, email: string, birthday: string, default_lang: string, note: string, ref_facturation: string, ref_contrat: string, ref_commande: string, ref_propal: string, user_id: string, user_login: string, civility_id: string, poste: string} $contact)

Create Contact

bool
createFileFromChunks(string $temp_dir, string $upload_dir, string $fileName, string $chunkSize, string $totalSize)

Check if all the parts exist, and gather all the parts of the file together.

array{result: array{result_code: string, result_label: string}}
createInvoice(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: string, ref: string, ref_ext: string, thirdparty_id: int, fk_user_author: string, fk_user_valid: string, date: string, date_due: string, date_creation: string, date_validation: string, date_modification: string, payment_mode_id: string, type: int, total_net: float, total_vat: float, total: float, note_private: string, note_public: string, status: int, close_code: string, close_note: string, project_id: string, lines?: array<array{line: mixed, id: string, type: int, desc: string, vat_rate: float, qty: float, unitprice: float, total_net: float, total_vat: float, total: float, date_start: string, date_end: string, product_id: int, product_ref: string, product_label: string, product_desc: string}>} $invoice)

Create an invoice

array{result: array{result_code: string, result_label: string}, id?: int, ref?: string, ref_ext?: string}
createInvoiceFromOrder(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $id_order = 0, string $ref_order = '', string $ref_ext_order = '')

Create an invoice from an order

int<-1, -1>
createNewDictionnary(string $modulename, string $file, string $namedic, ?array{langs: string, tabname: string[], tablib: string[], tabsql: string[], tabsqlsort: string[], tabfield: string[], tabfieldvalue: string[], tabfieldinsert: string[], tabrowid: string[], tabcond: array<string|bool|int>, tabhelp: array<array{code: string, field2: string}>} $dictionnaires = null)

Create a new dictionary table.

array{result: array{result_code: string, result_label: string}}
createOrder(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: string, ref: string, ref_client: string, ref_ext: string, thirdparty_id: int, status: int, billed: string, total_net: float, total_vat: float, total_localtax1: float, total_localtax2: float, total: float, date: string, date_due: string, date_creation: string, date_validation: string, date_modification: string, source: string, note_private: string, note_public: string, project_id: string, mode_reglement_id: string, mode_reglement_code: string, mode_reglement: string, cond_reglement_id: string, cond_reglement_code: string, cond_reglement: string, cond_reglement_doc: string, date_livraison: int, demand_reason_id: string, lines: array<array{line: mixed, id: string, type: int, fk_commande: int, fk_parent_line: int, desc: string, qty: float, price: float, unitprice: float, vat_rate: float, remise: float, remise_percent: float, total_net: float, total_vat: float, total: float, date_start: string, date_end: string, product_id: int, product_ref: string, product_label: string, product_desc: string}>} $order)

Create order

array
createPartArray(object $structure, string $prefix = "")

create_part_array

array{result: array{result_code: string, result_label: string}, id?: int}
createPayment(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: int, thirdparty_id: int|string, amount: float|string, num_payment: string, bank_account: int|string, payment_mode_id?: int|string, invoice_id?: int|string, int_label?: string, emitter: string, bank_source: string} $payment)

Create a payment

array{result: array{result_code: string, result_label: string}}
createProductOrService(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: string, ref: string, ref_ext: string, type: string, label: string, description: string, date_creation: string, date_modification: string, note: string, status_tobuy: string, status_tosell: string, barcode: string, barcode_type: string, country_id: string, country_code: string, customcode: string, price_net: string, price: string, price_min_net: string, price_min: string, price_base_type: string, vat_rate: string, vat_npr: string, localtax1_tx: string, localtax2_tx: string, stock_alert: string, stock_real: string, stock_pmp: string, warehouse_ref: string, canvas: string, import_key: string, dir: string, images: array<array{photo: string, photo_vignette: string, imgWidth: string, imgHeight: string}>} $product)

Create an invoice

array{id?: int, ref?: string, result: array{result_code: string, result_label: string}}
createProject(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: string, ref: string, label: string, thirdparty_id: int, public: int, status: int, date_start: string, date_end: string, budget: int, description: string, elements: array<array{id: int, user: int}>} $project)

Create project

array{result: array{result_code: string, result_label: string}}
createThirdParty(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: string, ref: string, ref_ext: string, fk_user_author: string, status: string, client: string, supplier: string, customer_code: string, supplier_code: string, customer_code_accountancy: string, supplier_code_accountancy: string, date_creation: string, date_modification: string, note_private: string, note_public: string, address: string, zip: string, town: string, region_code: string, country_id: string, country_code: string, country: string, phone: string, fax: string, email: string, url: string, profid1: string, profid2: string, profid3: string, profid4: string, profid5: string, profid6: string, capital: string, vat_used: string, vat_number: string} $thirdparty)

Create a thirdparty

array{id?: int, result: array{result_code: string, result_label: string}}
createUserFromThirdparty(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{name: string, firstname: string, name_thirdparty: string, ref_ext: string, client: string, fournisseur: string, address: string, zip: string, town: string, country_id: string, country_code: string, phone: string, phone_mobile: string, fax: string, email: string, url: string, profid1: string, profid2: string, profid3: string, profid4: string, profid5: string, profid6: string, capital: string, tva_assuj: string, tva_intra: string, login: string, password: string, group_id: string} $thirdpartywithuser)

Create an external user with thirdparty and contact

void
create_key_table(array $list)

Output table

void
create_script_table(array $list)

Output table

creer_pass_aleatoire_1($sel = "")

\brief Fonction pour creer un mot de passe aleatoire en minuscule \param sel Donnee aleatoire \return string Mot de passe

creer_pass_aleatoire_2($sel = "")

\brief Fonction pour creer un mot de passe aleatoire melangeant majuscule, minuscule, chiffre et alpha et caracteres speciaux \remarks La fonction a ete prise sur http://www.uzine.net/spip \param sel Donnee aleatoire \return string Mot de passe

array<array{0: string, 1: string, 2: string}>
cron_prepare_head(Cronjob $object)

Return array of tabs to used on a cron job

array<array{0: string, 1: string, 2: string}>
cronadmin_prepare_head()

Return array of tabs to used on pages to setup cron module.

string
csvClean(string|int|float $newvalue, string $charset = '', string $separator = '')

Clean a cell to respect rules of CSV file cells

currency_name($code_iso, int<0, 1> $withcode = 0, $outputlangs = null)

Return label of currency or code+label

currentToken()

Return the value of token currently saved into session with name 'token'.

array<array{0: string, 1: string, 2: string}>
datapolicyAdminPrepareHead()

Prepare admin pages header

array<array{0: string, 1: string, 2: string}>
dav_admin_prepare_head()

Prepare array with list of tabs

object
decodeHttpBasicAuth(string $value)

Decode the value found into the Authorization HTTP header.

array<array{0: string, 1: string, 2: string}>
defaultvalues_prepare_head()

Prepare array with list of tabs

array<string, string>
deformatNVP(string $nvpstr)

This function will take NVPString and convert it to an Associative Array and it will decode the response.

int
delDocumentModel(string $name, string $type)

Delete document model used by doc generator

bool
delTree(string $dir)

delete recursively a directory

int
deleteFilesIntoDatabaseIndex($dir, string $file, $mode = 'uploaded', $object = null)

Delete files into database index using search criteria.

void
deletePerms(string $file)

Delete all permissions

array{result: array{result_code: string, result_label: string}}
deleteProductOrService(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, string $listofidstring)

Delete a product or service

void
deletePropsAndPermsFromDoc(string $file, string $objectname)

Delete property and permissions from documentation ascii file if we delete an object

void
deletePropsFromDoc(string $file, string $objectname)

Delete property from documentation if we delete object

array{result: array{result_code: string, result_label: string}}
deleteThirdParty(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, string $id = '', string $ref = '', string $ref_ext = '')

Delete a thirdparty

delivery_order_pdf_create(DoliDB $db, Livraison $object, string $modele, Translate $outputlangs = '')
deprecated

Create object on disk

array<array{0: string, 1: string, 2: string}>
delivery_prepare_head(Delivery $object)

Prepare array with list of tabs

string[]
detectModule()

auto detect module name and version from file name

string
detect_dolibarr_main_data_root(string $dolibarr_main_document_root)

Automatically detect Dolibarr's main data root

string
detect_dolibarr_main_document_root()

Automatically detect Dolibarr's main document root

string
detect_dolibarr_main_url_root()

Automatically detect Dolibarr's main URL root

string
dictFieldList($fieldlist, ?object $obj = null, $tabname = '', $context = '')

Show fields in insert/edit mode

string
diff($TMergedSkills)

Return a html list element with diff between required rank and user rank

string
dirbasename(string $pathfile)

Return the relative dirname (relative to DOL_DATA_ROOT) of a full path string.

string
dispatchedOrders()

dispatchedOrders

void
displayBox(string $selectedDate, int $month, int $year)

Show box

void
displayPositionCard($object)

Show the card of a position

string
displayRankInfos(int $selected_rank, int $fk_skill, string $inputname = 'TNote', string $mode = 'view')

Used to print ranks of a skill into several case, view or edit pour js necessary to select a rank

displayUsersListWithPicto($TUser, int $fk_usergroup = 0, $namelist = 'list-user')

Display a list of User with picto

doc_getlinedesc($line, Translate $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0)

Return line description translated in outputlangs and encoded into UTF8

int
doc_label_pdf_create(DoliDB $db, array{} $arrayofrecords, string $modele, Translate $outputlangs, string $outputdir = '', $template = 'standardlabel', $filename = 'tmp_address_sheet.pdf')

Create a document onto disk according to template module.

string
dolAddEmailTrackId(string $email, string $trackingid)

Return an email formatted to include a tracking id For example [email protected] becom [email protected]

string
dolBECalculateStructuredCommunication(string $invoice_number, int $invoice_type)

Calculate Structured Communication / BE Bank payment reference number

string
dolBuildUrl(string $url, array<string, int|float|string> $params = [], bool $addtoken = false)

Return path of url.

string
dolButtonToOpenExportDialog(string $name, string $label, string $buttonstring, string $exportSiteName, string $overwriteGitUrl, Website $website)

Create a dialog with two buttons for export and overwrite of a website

dolButtonToOpenUrlInDialogPopup(string $name, string $label, string $buttonstring, string $url, $disabled = '', $morecss = 'classlink button bordertransp', $jsonopen = '', $jsonclose = '', $accesskey = '')

Return HTML code to output a button to open a dialog popup box.

bool
dolCheckFilters(string $sqlfilters, string $error = '', int $parenthesislevel = 0)

Return if a $sqlfilters parameter has a valid balance of parenthesis

string[]
dolCheckOnFileName(string $src_file, string $dest_file = '')

Check virus into a file

string[]
dolCheckVirus(string $src_file, string $dest_file = '')

Check virus into a file

void
dolChmod($filepath, string $newmask = '')

Change mod of a file

string
dolCompletUrlForDropdownButton(string $url, array $params, bool $addDolUrlRoot = true)

An function to complete dropdown url in dolGetButtonAction

int
dolCopyDir(string $srcfile, string $destfile, string $newmask, int $overwriteifexists, array<string, string> $arrayreplacement = null, int $excludesubdir = 0, string[] $excludefileext = null, int $excludearchivefiles = 0)

Copy a dir to another dir. This include recursive subdirectories.

string
dolDecrypt(string $chain, string $key = '')

Decode a string with a symmetric encryption. Used to decrypt sensitive data saved into database.

bool
dolDispatchToDo(int $order_id)

Check if there is still some dispatching of stock to do.

string
dolEncrypt(string $chain, string $key = '', $ciphering = '', $forceseed = '')

Encode a string with a symmetric encryption. Used to encrypt sensitive data into database.

string
dolEscapeXML(string $string)

Encode string for xml usage

array<string, string>
dolExplodeIntoArray(?string $string, string $delimiter = ';', string $kv = '=')

Split a string with 2 keys into key array.

string[]
dolExplodeKeepIfQuotes(string $input)

Explode a search string into an array but do not explode when keys are inside quotes.

string
dolFICalculatePaymentReference(string $invoice_number, int $statut, string $use_rf)

Calculate Creditor Reference RF / FI Bank payment reference number

string
dolFIGenerateInvoiceBarcodeData(string $recipient_account, string $amount, string $bank_reference, string $due_date)

Calculate payment Barcode data with FI/RF bank payment reference number

string
dolForgeCriteriaCallback(string[] $matches)

Function to forge a SQL criteria from a Dolibarr filter syntax string.

string
dolForgeDummyCriteriaCallback(string[] $matches)

Function to forge a SQL criteria from a Dolibarr filter syntax string.

string[]
dolForgeExplodeAnd(string $sqlfilters)

Explode an universal search string with AND parts.

string
dolForgeSQLCriteriaCallback(string[] $matches)

Function to forge a SQL criteria from a USF (Universal Filter Syntax) string.

string
dolGetBadge(string $label, string $html = '', string $type = 'primary', ""|"pill"|"dot" $mode = '', string $url = '', array{attr?: array{class: string, title: string}, css?: string} $params = array())

Function dolGetBadge

string
dolGetButtonAction(string $label, string $text = '', string $actionType = 'default', string|array<int, array{lang: string, enabled: bool, perm: bool|int, label: string, url: string, urlroot?: string, isDropDown?: int<0, 1>}> $url = '', string $id = '', bool|int $userRight = 1, array{confirm?: array{url?: string, title?: string, content?: string, use_unsecured_unescapedattr?: bool|string[], action-btn-label?: string, cancel-btn-label?: string, modal?: bool}, attr?: array<string, mixed>, areDropdownButtons?: bool, backtopage?: string, lang?: string, enabled?: bool, perm?: int<0, 1>, label?: string, url?: string, isDropdown?: int<0, 1>, isDropDown?: int<0, 1>} $params = array())

Function dolGetButtonAction

string
dolGetButtonTitle(string $label, string $helpText = '', string $iconClass = 'fa fa-file', string $url = '', string $id = '', int<-2, 2> $status = 1, array<string, mixed> $params = array())

Function dolGetButtonTitle : this kind of buttons are used in title in list

string
dolGetButtonTitleSeparator(string $moreClass = "")

Add space between dolGetButtonTitle

string
dolGetCountryCodeFromIp($ip)

Return a country code from IP. Empty string if not found.

string
dolGetElementUrl(int $objectid, string $objecttype, int $withpicto = 0, string $option = '')

Return link url to an object

string
dolGetFirstLastname(string $firstname, string $lastname, int $nameorder = -1)

Return firstname and lastname in correct order

string
dolGetFirstLetters(string $s, int $nbofchar = 1)

Return first letters of a strings.

dolGetFirstLineOfText($text, $nboflines = 1, $charset = 'UTF-8')

Return first line of text. Cut will depends if content is HTML or not.

dolGetLdapPasswordHash($password, string $type = 'md5')

Returns a specific ldap hash of a password.

string[]|int
dolGetListOfObjectClasses(string $destdir)

Get list of existing objects from a directory

array<string, string>
dolGetModulesDirs(string $subdir = '')

Return list of directories that contain modules.

string
dolGetRandomBytes(int $length)

Return a string of random bytes (hexa string) with length = $length for cryptographic purposes.

string
dolGetStatus(string $statusLabel = '', string $statusLabelShort = '', string $html = '', string $statusType = 'status0', int<0, 6> $displayMode = 0, string $url = '', array<string, mixed> $params = array())

Output the badge of a status.

void
dolIncludeHtmlContent(string $contentfile)

Clean an HTML page to report only content, so we can include it into another page It outputs content of file sanitized from html and body part.

int<0, 1>
dolIsAllowedForPreview(string $file)

Return if a file is qualified for preview

string
dolJSToSetRandomPassword(string $htmlname, string $htmlnameofbutton = 'generate_token', int $generic = 1)

Output javascript to autoset a generated password using default module into a HTML element.

dolKeepOnlyPhpCode($str)

Keep only PHP code part from a HTML string page.

array<mixed, array{login: string, age: int, creation: int|false, modification: int, raw: string, remote_ip: string, user_agent: string}>
dolListSessions()

List sessions in db

string
dolMd2Asciidoc(string $content, string $parser = 'dolibarr', ?array<string, string> $replaceimagepath = null)

Function to parse MD content into ASCIIDOC

string
dolMd2Html(string $content, "parsedown"|"nl2br" $parser = 'parsedown', ?array<string, string> $replaceimagepath = null)

Function to parse MD content into HTML

string|int
dolNumberToWord(float $numero, Translate $langs, string $numorcurrency = 'number')
deprecated

Function to return number or amount in text.

dolObfuscateEmail($mail, string $replace = "*", $nbreplace = 8, $nbdisplaymail = 4, $nbdisplaydomain = 3, $displaytld = true)

Returns an email value with obfuscated parts.

dolPrintHTML($s, $allowiframe = 0)

Return a string (that can be on several lines) ready to be output on a HTML page.

dolPrintHTMLForAttribute($s, $escapeonlyhtmltags = 0, $allowothertags = array())

Return a string ready to be output into an HTML attribute (alt, title, data-html, ...) With dolPrintHTMLForAttribute(), the content is HTML encode, even if it is already HTML content.

dolPrintHTMLForAttributeUrl($s)

Return a string ready to be output on a href attribute (this one need a special because we need content is HTML with no way to detect it is HTML).

dolPrintHTMLForTextArea($s, $allowiframe = 0)

Return a string ready to be output on input textarea.

string
dolPrintLabel(string $s, int $escapeonlyhtmltags = 0)

Return a string label (so on 1 line only and that should not contains any HTML) ready to be output on HTML page.

string
dolPrintPassword(string $s)

Return a string ready to be output on an HTML attribute (alt, title, ...)

void
dolPrintSignatureImage(TCPDF $pdf, Translate $langs, array<string, int|float|string|mixed[]> $params)

Output the signature file into the PDF object.

dolPrintText($s)

Return a string label (possible on several lines and that should not contains any HTML) ready to be output on HTML page.

dolReplaceInFile($srcfile, $arrayreplacement, $destfile = '', $newmask = '0', $indexdatabase = 0, $arrayreplacementisregex = 0)

Make replacement of strings into a file.

dolReplaceRegExInFile($srcfile, $arrayreplacement, $destfile = '', $newmask = 0, $indexdatabase = 0)

Make replacement of strings into a file.

string
dolReplaceSmileyCodeWithUTF8(string $content)

Converts smiley string into the utf8 sequence.

bool
dolRotateImage(string $file_path)

dolRotateImage if image is a jpg file.

bool
dolSaveCssFile(string $filecss, string $csscontent)

Save content of a page on disk

bool
dolSaveHtaccessFile(string $filehtaccess, string $htaccess)

Save content of a page on disk

bool
dolSaveHtmlHeader(string $filehtmlheader, string $htmlheadercontent)

Save content of a page on disk

bool
dolSaveIndexPage(string $pathofwebsite, string $fileindex, string $filetpl, string $filewrapper, Website $object = null)

Save content of the index.php and/or the wrapper.php page

bool
dolSaveJsFile(string $filejs, string $jscontent)

Save content of a page on disk. For example into documents/website/mywebsite/javascript.js.php file.

bool
dolSaveLicense(string $file, string $content)

Save content of a page on disk

bool
dolSaveManifestJson(string $file, string $content)

Save content of a page on disk

bool
dolSaveMasterFile(string $filemaster)

Save content of a page on disk

bool
dolSavePageAlias(string $filealias, Website $object, WebsitePage $objectpage)

Save an alias page on disk (A page that include the reference page).

bool
dolSavePageContent(string $filetpl, Website $object, WebsitePage $objectpage, int $backupold = 0)

Save content of a page on disk (page name is generally ID_of_page.php).

bool
dolSaveReadme(string $file, string $content)

Save content of a page on disk

bool
dolSaveRobotFile(string $filerobot, string $robotcontent)

Save content of a page on disk

bool
dolSessionClose()

This function is executed on shutdown of the session.

bool
dolSessionDestroy(string $sess_id)

This is called whenever the session_destroy() function call is made. Returns true if the session has successfully been deleted.

bool
dolSessionGC(int $max_lifetime)

This function is called on a session's start up with the probability specified in session.gc_probability.

bool
dolSessionOpen(string $save_path, string $session_name)

The session open handler called by PHP whenever a session is initialized.

string
dolSessionRead(string $sess_id)

This function is called whenever a session_start() call is made and reads the session variables.

bool
dolSessionWrite(string $sess_id, string $val)

This function is called when a session is initialized with a session_start( ) call, when variables are registered or unregistered, and when session variables are modified. Returns true on success.

void
dolSetCookie(string $cookiename, string $cookievalue, int $expire = -1)

Set a cookie

string
dolSlugify($stringtoslugify)

Returns text slugified (lowercase and no special char, separator is "-").

string
dolSqlDateFilter(string $datefield, int|string $day_date, int|string $month_date, int|string $year_date, int $excludefirstand = 0, bool|int<0, 1>|"gmt"|"tzserver"|"tzref"|"tzuser"|"tzuserrel" $gm = false)

Generate a SQL string to make a filter into a range (for second of date until last second of date).

string
dolStripPhpCode(string $str, string $replacewith = '')

Remove PHP code part from a string.

dolValidElement($element)

No description

int
dolWebsiteIncrementCounter(int $websiteid, string $websitepagetype, int $websitepageid)

Increase the website counter of page access.

void
dolWebsiteOutput(string $content, string $contenttype = 'html', int $containerid = 0)

Render a string of an HTML content and output it.

dol_add_file_process($upload_dir, $allowoverwrite = 0, $updatesessionordb = 0, $keyforsourcefile = 'addedfile', $savingdocmask = '', $link = null, $trackid = '', $generatethumbs = 1, $object = null, $forceFullTextIndexation = '', $mode = 0)

Get and save an upload file (for example after submitting a new file in a mail form).

int<0, 2>
dol_auguria_showmenu(int $type_user, array{rowid: string, fk_menu: string, langs: string, enabled: int<0, 2>, type: string, fk_mainmenu: string, fk_leftmenu: string, url: string, titre: string, perms: string, target: string, mainmenu: string, leftmenu: string, position: int, positionfull: int|string, showtopmenuinframe: int, level: int, prefix: string, module: string} $menuentry, string[] $listofmodulesforexternal)

Function to test if an entry is enabled or not

dol_banner_tab(CommonObject $object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', int $nodbprefix = 0, string $morehtmlleft = '', string $morehtmlstatus = '', $onlybanner = 0, string $morehtmlright = '')

Show tab footer of a card.

string
dol_basename(string $pathfile)

Make a basename working with all page code (default PHP basenamed fails with cyrillic).

string
dol_bc(string $var, string $moreclass = '')

Return string to add class property on html element with pair/impair.

string
dol_buildlogin($lastname, string $firstname)

Build a login from lastname, firstname

dol_buildpath($path, int $type = 0, $returnemptyifnotfound = 0)

Return path of url or filesystem. Can check into alternate dir or alternate dir + main dir depending on value of $returnemptyifnotfound.

bool
dol_cache_refresh(string $directory, string $filename, int $cachetime)

Test if Refresh needed.

bool
dol_ch_controle_bvrb(string $bvrb)

Return if a BVRB number is valid or not (For Switzerland)

mixed
dol_check_secure_access_document(string $modulepart, string $original_file, int $entity, User|null $fuser = null, string $refname = '', string $mode = 'read')

Security check when accessing to a document (used by document.php, viewimage.php and webservices to get documents).

dol_clone($srcobject, $native = 2)

Create a clone of instance of object (new instance with same value for each properties) With native = 0: Deprecated. Property that are references are different memory area in the new object (full isolation clone). This means $this->objectproperty of the new object may not be valid (except this->db that is voluntarly kept).

dol_clone_in_array(object $srcobject, $startlevel = 0)

Create a clone of instance of object into a full array, using recursive call.

string
dol_color_minus(string $color, int $minus, int $minusunit = 16)

Change color with a delta

int
dol_compare_file(object $a, object $b)

Fast compare of 2 files identified by their properties ->name, ->date and ->size

dol_compress_dir($inputdir, $outputfile, $mode = "zip", $excludefiles = '', $rootdirinzip = '', $newmask = '0')

Compress a directory and subdirectories into a package file.

dol_compress_file($inputfile, $outputfile, $mode = "gz", $errorstring = null)

Compress a file.

dol_concat($text1, string $text2)

Concat 2 strings. Can be used for dol_eval strings for example.

dol_concatdesc($text1, string $text2, $forxml = false, $invert = false)

Concat 2 descriptions with a new line between them (second operand after first one with appropriate new line separator) text1 html + text2 html => text1 + '
' + text2 text1 html + text2 txt => text1 + '
' + dol_nl2br(text2) text1 txt + text2 html => dol_nl2br(text1) + '
' + text2 text1 txt + text2 txt => text1 + '\n' + text2

string|false
dol_convertToWord(float $num, Translate $langs, string $currency = '', bool $centimes = false)

Function to return a number into a text.

dol_convert_file(string $fileinput, $ext = 'png', $fileoutput = '', $page = '')

Convert an image file or a PDF into another image format.

dol_copy($srcfile, $destfile, $newmask = '0', $overwriteifexists = 1, $testvirus = 0, $indexdatabase = 0)

Copy a file to another file.

int
dol_count_nb_of_line($file)

Count number of lines in a file

string
dol_decode(string $chain, string $key = '1')

Decode a base 64 encoded + specific delta change.

dol_delete_dir(string $dir, $nophperrors = 0)

Remove a directory (not recursive, so content must be empty).

dol_delete_dir_recursive($dir, int $count = 0, $nophperrors = 0, $onlysub = 0, $countdeleted = 0, $indexdatabase = 1, $nolog = 0, $level = 0)

Remove a directory $dir and its subdirectories (or only files and subdirectories)

dol_delete_file(string $file, $disableglob = 0, $nophperrors = 0, $nohook = 0, $object = null, $allowdotdot = false, $indexdatabase = 1, $nolog = 0)

Remove a file or several files with a mask.

dol_delete_preview(object $object)

Delete all preview files linked to object instance.

bool
dol_dir_is_emtpy($folder)

Test if a folder is empty

array<array{name: string, path: string, level1name: string, relativename: string, fullname: string, date: string, size: int, perm: int, type: string}>
dol_dir_list(string $utf8_path, string $types = "all", int $recursive = 0, string|string[]|null $filter = "", string|string[]|null $excludefilter = null, string $sortcriteria = "name", int $sortorder = SORT_ASC, int $mode = 0, int $nohook = 0, string $relativename = "", int $donotfollowsymlinks = 0, int $nbsecondsold = 0)

Scan a directory and return a list of files/directories.

array<array{rowid: string, label: string, name: string, path: string, level1name: string, fullname: string, fullpath_orig: string, date_c: string, date_m: string, type: string, keywords: string, cover: string, position: int, acl: string, share: string, description: string}>
dol_dir_list_in_database(string $path, string $filter = "", string[]|null $excludefilter = null, string $sortcriteria = "name", int $sortorder = SORT_ASC, int $mode = 0, string $sqlfilters = "", ?object $object = null)

Scan a directory and return a list of files/directories.

strAv
dol_efc_config()

Return array of ciphers mode available

int
dol_eldy_showmenu(string $type_user, array $menuentry, array $listofmodulesforexternal)

Function to test if an entry is enabled or not

string
dol_encode(string $chain, string $key = '1')

Encode a string with base 64 algorithm + specific delta change.

string
dol_escape_all($stringtoescape)

Returns text escaped for all protocols (so only alpha chars and numbers)

dol_escape_htmltag(string $stringtoescape, $keepb = 0, $keepn = 0, $noescapetags = '', $escapeonlyhtmltags = 0, $cleanalsojavascript = 0)

Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input fields.

dol_escape_js($stringtoescape, int<0, 3> $mode = 0, $noescapebackslashn = 0)

Returns text escaped for inclusion into javascript code

string
dol_escape_json($stringtoescape)

Returns text escaped for inclusion into javascript code

dol_escape_php($stringtoescape, int<1, 2> $stringforquotes = 2)

Returns text escaped for inclusion into a php string, build with double quotes " or '

dol_escape_uri(string $stringtoescape)

Returns text escaped by RFC 3986 for inclusion into a clickable link.

string
dol_escape_xml($stringtoescape)

Returns text escaped for inclusion into a XML string

dol_eval($s, $returnvalue = 1, $hideerrors = 1, $onlysimplestring = '1')

Replace eval function to add more security.

dol_eval_new($s)

Replace eval function to add more security.

dol_eval_standard($s, $hideerrors = 1, $onlysimplestring = '1')

Replace eval function to add more security.

void
dol_fiche_end($notab = 0)

Show tab footer of a card

dol_fiche_head(array<int, array<int<0, 5>, string>> $links = array(), string $active = '0', string $title = '', int $notab = 0, $picto = '', int $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0, $moretabssuffix = '')

Show tab header of a card

void
dol_filecache(string $directory, string $filename, mixed $object)

Store object in file.

int
dol_filemtime(string $pathoffile)

Return time of a file

int
dol_fileperm(string $pathoffile)

Return permissions of a file

int
dol_filesize(string $pathoffile)

Return size of a file

dol_format_address(object $object, $withcountry = 0, $sep = "\n", $outputlangs = null, $mode = 0, $extralangcode = '')

Return a formatted address (part address/zip/town/state) according to country rules.

bool
dol_ftp_close(resource|Connection $connect_id)

Tell if an entry is a FTP directory

array{conn_id: false|null|resource, ok: int<0, 1>, mesg: string, curdir: string, curdiriso: string}
dol_ftp_connect(string $ftp_server, string $ftp_port, string $ftp_user, string $ftp_password, string $section, int $ftp_passive = 0)

Connect to FTP server

bool
dol_ftp_delete(resource|Connection $connect_id, string $file, string $newsection)

Delete a FTP file

bool|resource
dol_ftp_get(resource|Connection $connect_id, string $localfile, string $file, string $newsection)

Download a FTP file

bool|string
dol_ftp_mkdir(resource|Connection $connect_id, string $newdir, string $newsection)

Remove FTP directory

bool
dol_ftp_put(resource|Connection $connect_id, string $file, string $localfile, string $newsection)

Upload a FTP file

bool
dol_ftp_rmdir(resource|Connection $connect_id, string $file, string $newsection)

Remove FTP directory

string
dol_getDefaultFormat(Translate $outputlangs = null)

Try to guess default paper format according to language into $langs

dol_getIdFromCode(DoliDB $db, $key, $tablename, $fieldkey = 'code', $fieldid = 'id', $entityfilter = 0, $filters = '', $useCache = true)

Return an id or code from a code or id.

dol_getImageSize($file, bool $url = false)

Return size of image file on disk (Supported extensions are gif, jpg, png, bmp and webp)

dol_get_fiche_end(int<-1, 1> $notab = 0)

Return tab footer of a card

dol_get_fiche_head(array<int, array<int<0, 5>, string>> $links = array(), string $active = '', string $title = '', int $notab = 0, $picto = '', int $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0, $moretabssuffix = '', $dragdropfile = 0, $morecssdiv = '')

Show tabs of a record

dol_get_first_day(int $year, $month = 1, $gm = false)

Return GMT time for first day of a month or year

array{year: int, month: int, week: string, first_day: int, first_month: int, first_year: int, prev_year: int, prev_month: int, prev_day: int}
dol_get_first_day_week(int $day, $month, $year, $gm = false)

Return first day of week for a date. First day of week may be monday if option MAIN_START_WEEK is 1.

dol_get_first_hour(int $date, $gm = 'tzserver')

Return GMT time for first hour of a given GMT date (it removes hours, min and second part)

int|""
dol_get_last_day(int $year, $month = 12, $gm = false)

Return GMT time for last day of a month or year.

dol_get_last_hour(int $date, $gm = 'tzserver')

Return GMT time for last hour of a given GMT date (it replaces hours, min and second part to 23:59:59)

dol_get_next_day($day, int $month, $year)

Return next day

array{year: int, month: int}
dol_get_next_month(int $month, int $year)

Return next month

array{year: int, month: int, day: int}
dol_get_next_week($day, int $week, $month, int $year)

Return next week

array<string, mixed>
dol_get_object_properties(object $obj, string[] $properties = [])

Get properties for an object - including magic properties when requested

dol_get_prev_day($day, int $month, $year)

Return previous day

array{year: int, month: int}
dol_get_prev_month(int $month, int $year)

Return previous month

array{year: int, month: int, day: int}
dol_get_prev_week($day, int $week, $month, int $year)

Return previous week

dol_getcache($memoryid, int $filecache = 0)

Read a memory area shared by all users, all sessions on server

array{}|array{seconds: int<0, 59>, minutes: int<0, 59>, hours: int<0, 23>, mday: int<1, 31>, wday: int<0, 6>, mon: int<1, 12>, year: int<0, 9999>, yday: int<0, 366>, 0: int}
dol_getdate(int $timestamp, bool $fast = false, $forcetimezone = '')

Return an array with locale date info.

int
dol_getmypid()

Return getmypid() or random PID when function is disabled Some web hosts disable this php function for security reasons and sometimes we can't redeclare function.

dol_getprefix(string $mode = '')

Return a prefix to use for this Dolibarr instance, for session/cookie names or email id.

int<-1, -1>|null|mixed|mixed[]
dol_getshmop($memoryid)

Read a memory area shared by all users, all sessions on server

int
dol_getshmopaddress($memoryid)

Return shared memory address used to store dataset with key memoryid

string
dol_getwebuser($mode)

Return user/group account of web server

dol_hash(string $chain, $type = '0', $nosalt = 0, $mode = 0)

Returns a hash (non reversible encryption) of a string.

string
dol_html_entity_decode(string $a, int $b, string $c = 'UTF-8', int $keepsomeentities = 0)

Replace html_entity_decode functions to manage errors

string
dol_htmlcleanlastbr(string $stringtodecode)

This function remove all ending \n and br at end

string
dol_htmlentities(string $string, int $flags = ENT_QUOTES | ENT_SUBSTITUTE, string $encoding = 'UTF-8', bool $double_encode = false)

Replace htmlentities functions.

dol_htmlentitiesbr(string $stringtoencode, int $nl2brmode = 0, $pagecodefrom = 'UTF-8', $removelasteolbr = 1)

This function is called to encode a string into a HTML string but differs from htmlentities because a detection is done before to see if text is already HTML or not. Also, all entities but &,<,>," (because protected by code) and ' (because not included by the ENT_COMPAT mode) are converted.

string
dol_htmlentitiesbr_decode(string $stringtodecode, string $pagecodeto = 'UTF-8')

This function is called to decode a HTML string (it decodes entities and br tags)

dol_htmloutput_errors($mesgstring = '', string[] $mesgarray = array(), $keepembedded = 0)

Print formatted error messages to output (Used to show messages on html output).

dol_htmloutput_events(int $disabledoutputofmessages = 0)

Print formatted messages to output (Used to show messages on html output).

void
dol_htmloutput_mesg(string $mesgstring = '', string[] $mesgarray = array(), string $style = 'ok', int $keepembedded = 0)

Print formatted messages to output (Used to show messages on html output).

string
dol_htmlwithnojs(string $stringtoencode, int $nouseofiframesandbox = 0, string $check = 'restricthtml')

Sanitize a HTML to remove js, dangerous content and external links.

string
dol_imageResizeOrCrop($file, int $mode, $newWidth, $newHeight, $src_x = 0, $src_y = 0, $filetowrite = '', $newquality = 0)

Resize or crop an image file (Supported extensions are gif, jpg, png, bmp and webp)

dol_include_once(string $relpath, $classname = '')

Make an include_once using default root and alternate root if it fails.

void
dol_init_file_process(string $pathtoscan = '', string $trackid = '')

Scan a directory and init $_SESSION to manage uploaded files with list of all found files.

bool
dol_is_dir(string $folder)

Test if filename is a directory

bool
dol_is_dir_empty(string $dir)

Return if path is empty

bool
dol_is_file(string $pathoffile)

Return if path is a file

bool
dol_is_url(string $uri)

Return if path is an URI (the name of the method is misleading).

bool
dol_is_writable(string $folderorfile)

Test if directory or filename is writable

mixed
dol_json_decode(string $json, bool $assoc = false)
deprecated

Implement json_decode for PHP that does not support it Use json_encode and json_decode in your code !

string
dol_json_encode(mixed $elements)
deprecated

Implement json_encode for PHP that does not support it.

dol_listshmop()

Return list of contents of all memory area shared

void
dol_loginfunction(Translate $langs, Conf $conf, Societe $mysoc)

Show Dolibarr default login page.

int
dol_meta_create(CommonObject $object)

Create a meta file with document file into same directory.

float
dol_microtime_float()
deprecated

Same function than microtime in PHP 5 but compatible with PHP4

string
dol_mimetype(string $file, $default = 'application/octet-stream', $mode = 0)

Return MIME type of a file from its name with extension.

int
dol_mkdir(string $dir, string $dataroot = '', $newmask = '')

Creation of a directory (this can create recursive subdir)

int|""
dol_mktime($hour, int $minute, int $second, int $month, int $day, int $year, bool|int|string $gm = 'auto', int $check = 1)

Return a timestamp date built from detailed information (by default a local PHP server timestamp) Replace function mktime not available under Windows if year < 1970 PHP mktime is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows

null|array{name: string, path: string, level1name: string, relativename: string, fullname: string, date: string, size: int, perm: int, type: string}
dol_most_recent_file(string $dir, string $regexfilter = '', string[] $excludefilter = array('(\.meta|_preview.*\.png)$', '^\.'), int<0, 1> $nohook = 0, int<0, 3> $mode = 0)

Return file(s) into a directory (by default most recent)

bool
dol_move(string $srcfile, string $destfile, string $newmask = '0', int<0, 1> $overwriteifexists = 1, int<0, 1> $testvirus = 0, int<0, 1> $indexdatabase = 1, array<string, mixed> $moreinfo = array(), int|null $entity = null)

Move a file into another name.

bool
dol_move_dir(string $srcdir, string $destdir, int $overwriteifexists = 1, int $indexdatabase = 1, int $renamedircontent = 1)

Move a directory into another name.

int|string
dol_move_uploaded_file(string $src_file, string $dest_file, $allowoverwrite, $disablevirusscan = 0, $uploaderrorcode = 0, $nohook = 0, $keyforsourcefile = 'addedfile', $upload_dir = '', $mode = 0)

Check validity of a file upload from an GUI page, and move it to its final destination.

int
dol_nboflines(string $s, $maxchar = 0)

Return nb of lines of a clear text

dol_nboflines_bis($text, $maxlinesize = 0, $charset = 'UTF-8')

Return nb of lines of a formatted text with \n and
(WARNING: string must not have mixed \n and br separators)

dol_nl2br($stringtoencode, $nl2brmode = 0, $forxml = false)

Replace CRLF in string with a HTML BR tag.

int
dol_now($mode = 'gmt')

Return date for now. In most cases, we use this function without parameters (that means GMT time).

string
dol_osencode($str)

Return a string encoded into OS filesystem encoding. This function is used to define value to pass to filesystem PHP functions.

dol_print_address($address, string $htmlid, $element, $id, $noprint = 0, $charfornl = '')

Format address string

int
dol_print_cron_urls()

Show information with URLs to launch jobs

dol_print_date(null|int|string $time, string $format = '', $tzoutput = 'auto', Translate $outputlangs = null, $encodetooutput = false, $decorate = 0)

Output date in a string format according to outputlangs (or langs if not defined).

string
dol_print_email(string $email, int $contactid = 0, int $socid = 0, int|string $addlink = 0, int $max = 0, int $showinvalid = 1, int|string $withpicto = 0, string $morecss = 'paddingrightonly')

Show EMail link formatted for HTML output.

void
dol_print_error(DoliDB|null $db = null, string|string[] $error = '', $errors = null)

Displays error message system with all the information to facilitate the diagnosis and the escalation of the bugs.

void
dol_print_error_email(string $prefixcode, string $errormessage = '', string[] $errormessages = array(), string $morecss = 'error', string $email = '')

Show a public email and error code to contact if technical error

bool
dol_print_file($langs, string $filename, $searchalt = 0)

Output content of a file $filename in version of current language (otherwise may use an alternate language)

dol_print_graph(string $htmlid, $width, $height, $data, $showlegend = 0, $type = 'pie', $showpercent = 0, $url = '', $combineother = 0.05, $shownographyet = 0)

Show a javascript graph.

dol_print_ip($ip, int $mode = 0, $showname = 0)

Return an IP formatted to be shown on screen

void
dol_print_object_info(object|CommonObject $object, $usetable = 0)

Show information on an object TODO Move this into html.formother

dol_print_phone($phone, string $countrycode = '', $contactid = 0, $socid = 0, $addlink = '', $separ = "&nbsp;", $withpicto = '', $titlealt = '', $adddivfloat = 0, $morecss = 'paddingright')

Format phone numbers according to country

string
dol_print_profids(string $profID, string $profIDtype, string $countrycode = '', int<0, 2> $addcpButton = 1)

Format professional IDs according to their country

string
dol_print_reduction(int|float $reduction, Translate $langs)

Returns formatted reduction

string
dol_print_size(int $size, int $shortvalue = 0, int $shortunit = 0)

Return string with formatted size

string
dol_print_skype(string $skype, int $cid = 0, int $socid = 0, int $addlink = 0, int $max = 64)

Show Skype link

string
dol_print_socialnetworks(string $value, int $contactid, int $socid, string $type, array<string, array{rowid: int, label: string, url: string, icon: string, active: int}> $dictsocialnetworks = array())

Show social network link

string
dol_print_url(string $url, string $target = '_blank', int $max = 32, int $withpicto = 0, string $morecss = '')

Show Url link

string
dol_quoted_printable_encode(string $input, int $line_max = 76)

Taken from php documentation comments No more used

mixed
dol_readcachefile(string $directory, string $filename)

Read object from cachefile.

void
dol_remove_file_process(int $filenb, int $donotupdatesession = 0, int $donotdeletefile = 1, string $trackid = '')

Remove an uploaded file (for example after submitting a new file a mail form).

string
dol_sanitizeEmail($stringtoclean)

Clean a string to use it as an Email.

string
dol_sanitizeFileName(string $str, $newstr = '_', $unaccent = 1, $includequotes = 0, $allowdash = 0)

Clean a string to use it as a file name.

string
dol_sanitizeKeyCode(string $str)

Clean a string to use it as a key or code. So only char a-Z, A-Z, _ and 0-9 is kept.

string
dol_sanitizePathName(string $str, $newstr = '_', $unaccent = 0, $allowdash = 0)

Clean a string to use it as a path name. Similar to dol_sanitizeFileName but accept / and \ chars.

dol_sanitizeUrl($stringtoclean, int $type = 1)

Clean a string to use it as an URL (into a href or src attribute)

bool
dol_session_regenerate_id()

Replace session_regenerate_id()

void
dol_session_rotate(string $sessionname = '')

Destroy and recreate a new session without losing content.

void
dol_session_start()

Replace session_start()

void
dol_set_focus(string $selector)

Set focus onto field with selector (similar behaviour of 'autofocus' HTML5 tag)

dol_set_user_param($db, $conf, $user, $tab, $entity = -1)

Save personal parameter

dol_setcache($memoryid, mixed $data, $expire = 0, $filecache = 0, $replace = 0)

Save data into a memory area shared by all users, all sessions on server. Note: MAIN_CACHE_COUNT must be set.

dol_setshmop($memoryid, mixed|mixed[] $data, $expire)

Save data into a memory area shared by all users, all sessions on server

dol_shutdown()

Function called at end of web php process

int
dol_size($size, string $type = '')

Optimize a size for some browsers (phone, smarphone...)

dol_sort_array($array, $index, $order = 'asc', $natsort = 0, $case_sensitive = 0, $keepindex = 0)

Advanced sort array by the value of a given key, which produces ascending (default) or descending output and uses optionally natural case insensitive sorting (which can be optionally case sensitive as well).

string
dol_strftime(string $fmt, $ts = false, $is_gmt = false)

Format a string.

int|string
dol_string_is_good_iso(string $s, $clean = 0)

Check if a string is a correct iso string If not, it will not be considered as HTML encoded even if it is by FPDF.

string
dol_string_neverthesehtmltags(string $stringtoclean, $disallowed_tags = array('textarea'), $cleanalsosomestyles = 0)

Clean a string from some undesirable HTML tags.

string
dol_string_nohtmltag(string $stringtoclean, int $removelinefeed = 1, $pagecodeto = 'UTF-8', $strip_tags = 0, $removedoublespaces = 1)

Clean a string from all HTML tags and entities.

dol_string_nospecial(string $str, $newstr = '_', $badcharstoreplace = '', $badcharstoremove = '', $keepspaces = 0)

Clean a string from all punctuation characters to use it as a ref or login.

dol_string_nounprintableascii(string $str, $removetabcrlf = 1)

Clean a string from all non printable ASCII chars (0x00-0x1F and 0x7F). It can also removes also Tab-CR-LF. UTF8 chars remains.

string
dol_string_onlythesehtmlattributes(string $stringtoclean, $allowed_attributes = null)

Clean a string from some undesirable HTML tags.

string
dol_string_onlythesehtmltags(string $stringtoclean, $cleanalsosomestyles = 1, $removeclassattribute = 1, $cleanalsojavascript = 0, $allowiframe = 0, $allowed_tags = array(), $allowlink = 0, $allowscript = 0, $allowstyle = 0, $allowphp = 0)

Clean a string to keep only desirable HTML tags.

string
dol_string_unaccent(string $str)

Clean a string from all accent characters to be used as ref, login or by dol_sanitizeFileName

dol_stringtotime(string $string, $gm = 1)

Convert a string date into a GM Timestamps date Warning: YYYY-MM-DDTHH:MM:SS+02:00 (RFC3339) is not supported. If parameter gm is 1, we will use no TZ, if not we will use TZ of server, not the one inside string.

int
dol_strlen(?string $string, string $stringencoding = 'UTF-8')

Make a strlen call. Works even if mbstring module not enabled

string
dol_strtolower(string $string, string $encoding = "UTF-8")

Convert a string to lower. Never use strtolower because it does not works with UTF8 strings.

dol_strtoupper($string, $encoding = "UTF-8")

Convert a string to upper. Never use strtolower because it does not works with UTF8 strings.

string
dol_substr(string $string, int $start, int|null $length = null, string $stringencoding = '', int $trunconbytes = 0)

Make a substring. Works even if mbstring module is not enabled for better compatibility.

dol_survey_random(int $car)

Generate a random id

dol_syslog(string $message, $level = LOG_INFO, $ident = 0, $suffixinfilename = '', $restricttologhandler = '', $logcontext = null)

Write log message into outputs. Possible outputs can be: SYSLOG_HANDLERS = ["mod_syslog_file"] file name is then defined by SYSLOG_FILE SYSLOG_HANDLERS = ["mod_syslog_syslog"] facility is then defined by SYSLOG_FACILITY Warning, syslog functions are bugged on Windows, generating memory protection faults. To solve this, use logging to files instead of syslog (see setup of module).

bool
dol_textishtml(string $msg, int $option = 0)

Return if a text is a html content

dol_time_plus_duree($time, float $duration_value, $duration_unit, $ruleforendofmonth = 0)

Add a delay to a date

string
dol_trunc(string $string, int $size = 40, string $trunc = 'right', $stringencoding = 'UTF-8', $nodot = 0, $display = 0)

Truncate a string to a particular length adding '…' if string larger than length.

dol_ucfirst($string, $encoding = "UTF-8")

Convert first character of the first word of a string to upper. Never use ucfirst because it does not works with UTF8 strings.

dol_ucwords($string, $encoding = "UTF-8")

Convert first character of all the words of a string to upper.

dol_uncompress($inputfile, $outputdir)

Uncompress a file

string
dol_unescapefile(string $filename)

Unescape a file submitted by upload.

string
dol_user_country()

Return country code for current user.

bool
dol_validElement(string $element)

Return if var element is ok

dol_verifyHash(string $chain, $hash, $type = '0')

Compute a hash and compare it to the given one For backward compatibility reasons, if the hash is not in the password_hash format, we will try to match against md5 and sha1md5 If constant MAIN_SECURITY_HASH_ALGO is defined, we use this function as hashing function.

dolibarr_del_const($db, $name, $entity = 1)

Delete a constant

dolibarr_get_const($db, $name, $entity = 1)

Get the value of a setup constant from database

void
dolibarr_install_syslog(string $message, int $level = LOG_DEBUG)

Log function for install pages

dolibarr_set_const($db, $name, $value, $type = 'chaine', $visible = 0, $note = '', $entity = 1)

Insert a parameter (key,value) into database (delete old key then insert it again).

dolibarr_support_syslog(mixed $message, mixed $level = LOG_DEBUG)

Output a text into a log file

int
don_create(DoliDB $db, int $id, string $message, string $modele, Translate $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)

Cree un don sur disque en fonction du modele de DON_ADDON_PDF

array<array{0: string, 1: string, 2: string}>
donation_admin_prepare_head()

Prepare array with list of admin tabs

array<array{0: string, 1: string, 2: string}>
donation_prepare_head(Don $object)

Prepare array with list of tabs

string
dragAndDropFileUpload(string $htmlname)

Function to manage the drag and drop of a file.

array<array{0: string, 1: string, 2: string}>
ecm_admin_prepare_head()

Return array head with list of tabs to view object information.

array<array{0: string, 1: string, 2: string}>
ecm_file_prepare_head(EcmFiles $object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
ecm_prepare_dasboard_head()

Prepare array with list of different ecm main dashboard

array<array{0: string, 1: string, 2: string}>
ecm_prepare_head(EcmDirectory $object, string $module = 'ecm', string $section = '')

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
ecm_prepare_head_fm(EcmDirectory $object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
email_admin_prepare_head()

Return array head with list of tabs to view object information.

array<array{0: string, 1: string, 2: string}>
emailcollectorPrepareHead(EmailCollector $object)

Prepare array of tabs for EmailCollector

array<array{0: string, 1: string, 2: string}>
emailing_prepare_head(Mailing $object)

Prepare array with list of tabs

string
encode(string $string)

Encode a string for vCard

int
encodedecode_dbpassconf($level = 0)

Encode or decode database password in config file

array
entity_prepare_head(object $object, array $aEntities)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
establishment_prepare_head(Establishment $object)

Return head table for establishment tabs screen

array<array<int, string>>
evaluationPrepareHead(Evaluation $object)

Prepare array of tabs for Evaluation

array<array{0: string, 1: string, 2: string}>
eventorganizationAdminPrepareHead()

Prepare admin pages header

array<array{0: string, 1: string, 2: string}>
expedition_admin_prepare_head()

Return array head with list of tabs to view object information.

expedition_pdf_create(DoliDB $db, Expedition $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)

Create a document onto disk according to template module.

array<array{0: string, 1: string, 2: string}>
expedition_prepare_head(Expedition $object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
expensereport_admin_prepare_head()

Return array head with list of tabs to view object information.

expensereport_pdf_create(DoliDB $db, ExpenseReport $object, $message, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)

expensereport_pdf_create

array<array{0: string, 1: string, 2: string}>
expensereport_prepare_head(object $object)

Prepare array with list of tabs

facture_pdf_create(DoliDB $db, Facture $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)

Create a document onto disk according to template module.

array<array{0: string, 1: string, 2: string}>
facture_prepare_head(Facture $object)

Initialize the array of tabs for customer invoice

array<array{0: string, 1: string, 2: string}>
facturefourn_prepare_head(FactureFournisseur $object)

Prepare array with list of tabs

factures($db, $year, $month, $paye)

No description

never
fail(string $message)

Abort invoice creation with a given error message

int<-1, 0>|CommonObject
fetchObjectByElement(int $element_id, string $element_type, string $element_ref = '', int<0, 2> $useCache = 0, int $maxCacheByType = 10)

Fetch an object from its id and element_type Inclusion of classes is automatic

int
fetchref(CommonObject $static_object, string $tmp_ref)

Fetch object with ref

fichinter_admin_prepare_head()

Return array head with list of tabs to view object information.

fichinter_create($db, object $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)

Create an intervention document on disk using template defined into FICHEINTER_ADDON_PDF

array<array{0: string, 1: string, 2: string}>
fichinter_prepare_head(Fichinter $object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
fichinter_rec_prepare_head(FichinterRec $object)

Prepare array with list of tabs

string
fieldLabel(string $langkey, string $fieldkey, int $fieldrequired = 0)
deprecated

Show a string with the label tag dedicated to the HTML edit field.

int
fieldList($fieldlist, ?object $obj = null, $tabname = '', $context = '')

Show fields in insert/edit mode

void
fieldListAccountModel($fieldlist, stdClass $obj = null, $tabname = '', $context = '')

Show fields in insert/edit mode

void
fieldListAccountingCategories($fieldlist, stdClass $obj = null, $tabname = '', $context = '')

Show fields in insert/edit mode

void
fieldListAccountingReport($fieldlist, stdClass $obj = null, $tabname = '', $context = '')

Show fields in insert/edit mode

fieldListJournal($fieldlist, ?object $obj = null, $tabname = '', $context = '')

Show fields in insert/edit mode

void
fieldListWebsites($fieldlist, ?object $obj = null, $tabname = '', $context = '')

Show fields in insert/edit mode

array<string, array{label: string, labelnohtml: string, position: int, table: string, tablefromt: string, type: string}>
fillArrayOfFilterFields(CommonObject $object, string $tablealias, string $labelofobject, array<string, array{label: string, labelnohtml: string, position: int, table: string, tablefromt: string, type: string}> $arrayoffields, int $level = 0, int $count = 0, string $tablepath = '')

Fill array of possible filter fields for an object

array<string, array{label: string, labelnohtml: string, position: int, table: string, tablefromt: string}>
fillArrayOfGroupBy(CommonObject $object, string $tablealias, string $labelofobject, array<string, array{label: string, labelnohtml: string, position: int, table: string, tablefromt: string}> $arrayofgroupby, int $level = 0, int $count = 0, string $tablepath = '')

Fill arrayofgroupby for an object

array<string, array{label: string, labelnohtml: string, position: int, table: string, tablefromt: string}>
fillArrayOfMeasures(mixed $object, string $tablealias, string $labelofobject, array<string, array{label: string, labelnohtml: string, position: int, table: string, tablefromt: string}> $arrayofmesures, int $level = 0, int $count = 0, string $tablepath = '')

Fill arrayofmesures for an object

array<string, array{label: string, labelnohtml: string, position: int, table: string, tablefromt: string}>
fillArrayOfXAxis(mixed $object, string $tablealias, string $labelofobject, array<string, array{label: string, labelnohtml: string, position: int, table: string, tablefromt: string}> $arrayofxaxis, int $level = 0, int $count = 0, string $tablepath = '')

Fill arrayofmesures for an object

void
findChildGanttLine(array<int, array{task_id: int, task_alternate_id: int, task_name: string, task_resources: string, task_start_date: int, task_end_date: int, task_is_group: int<0, 1>, task_position: int, task_css: string, task_milestone: int, task_parent: int, task_parent_alternate_id: int}> $tarr, int $parent, int[][] $task_dependencies, int $level)

Find child Gantt line

CommonObject|false
findobjecttosend(string $objecttype)

Find and init a specimen for the given object type

void
finishSimpleTable(bool $addLineBreak = false)

Add the correct HTML close tags for "startSimpleTable(...)" (use after the last table line)

array<array{0: string, 1: string, 2: string}>
fiscalyear_prepare_head(Fiscalyear $object)

Prepare array with list of tabs

void
force_switch_entity(int $newEntity)

Force switching conf of entity, even if user is connected Fox example when trying to go on public form of an other entity

string
forgeSQLFromUniversalSearchCriteria(?string $filter, string $errorstr = '', int<0, 1> $noand = 0, int<0, 1> $nopar = 0, int<0, 1> $noerror = 0)

forgeSQLFromUniversalSearchCriteria

formCategory($db, object $object, $typeid, $socid = 0, $showclassifyform = 1)

Function to output a form to add object into a category

void
form_constantes(array<string, array{type: string, label: string, tooltip?: string}>|array<int, string> $tableau, int<2, 3> $strictw3c = 2, $helptext = '', $text = '')

Show array with constants to edit

string
formatObject(object|array<string, mixed> $objtoshow, string $prefix)

formatObject

format_cal($format, string $string)

Encode for cal export

int
ftp_isdir(resource|Connection $connect_id, string $dir)

Tell if an entry is a FTP directory

void
generatePaymentResponse(PaymentIntent $intent)

Generate payment response

string
generate_random_id(int $car = 16)

Generate a random id

string
genkeypad(string $keypadname, string $formname)

Return a string to output a keypad

mixed
getActionComm(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $id)

Get ActionComm

stdClass>
getActionCommEcmList(ActionComm $object)

getActionCommEcmList

string|array{}|array{target: string, css: string, url: string, mime: string}
getAdvancedPreviewUrl(string $modulepart, string $relativepath, int<0, 1> $alldata = 0, string $param = '')

Return URL we can use for advanced preview links

void
getAllImages(Website $object, WebsitePage $objectpage, string $urltograb, string $tmp, string $action, int<0, 1> $modifylinks = 0, int<0, 1> $grabimages = 1, "root"|"subpage" $grabimagesinto = 'subpage')

Download all images found into an external URL.

string[][]
getAllOauth2Array()

Return array of possible OAUTH2 services

getApiError()

Get API errors

string
getAreaSearchFrom()

Return a HTML string that contains a additional search form

array<string, string[]>
getArrayOfEmoji()

Return array of Emojis. We can't move this function inside a common lib because we need it for security before loading any file.

array<string, string[]>
getArrayOfEmojiBis()

Return array of Emojis for miscellaneous use.

array<string, array{rowid: int, label: string, url: string, icon: string, active: int}>
getArrayOfSocialNetworks()

Get array of social network dictionary

array<array{type: int, filename: string, pos: int}>
getAttachments(int $jk, Connection $mbox)

Get attachments of a given mail

array{browsername: string, browserversion: string, browseros: string, browserua: string, layout: string, phone: string, tablet: bool}
getBrowserInfo(string $user_agent)

Return information about user browser

string
getCallerInfoString()

Get caller info as a string that can be appended to a log message.

mixed
getCategory(array{login: string, password: string, entity?: int, dolibarrkey: string} $authentication, int $id)

Get category infos and children

array<string, string>
getCommonSubstitutionArray(Translate $outputlangs, int $onlykey = 0, string[]|null $exclude = null, CommonObject $object = null, string[]|null $include = null)

Return array of possible common substitutions. This includes several families like: 'system', 'mycompany', 'object', 'objectamount', 'date', 'user'

array{result: array{result_code: string, result_label: string}}
getContact(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $id, string $ref_ext)

Get Contact

array{result: array{result_code: string, result_label: string}}
getContactsForThirdParty(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $idthirdparty)

Get list of contacts for third party

getCountriesInEEC()

Return list of countries that are inside the EEC (European Economic Community) Note: Try to keep this function as a "memory only" function for performance reasons.

getCountriesInSEPA()

Return list of countries that are inside the SEPA zone (Single Euro Payment Area) Note: Try to keep this function as a "memory only" function for performance reasons.

getCountry($searchkey, ""|"0"|"1"|"2"|"3"|"all" $withcode = '', $dbtouse = null, $outputlangs = null, $entconv = 1, $searchlabel = '')

Return country label, code or id from an id, code or label

getCurrentPeriodOfFiscalYear($db, Conf $conf, $from_time = null, "tzserver"|"gmt" $gm = 'tzserver', $withenddateonly = 1)

Get current period of fiscal year?

string
getCustomerInvoiceDraftTable(int $maxCount = 500, int $socid = 0)

Return a HTML table that contains a list with customer invoice drafts

string
getCustomerInvoiceLatestEditTable(int $maxCount = 5, int $socid = 0)

Return a HTML table that contains a list with latest edited customer invoices

string
getCustomerInvoicePieChart(int $socid = 0)

Return a HTML table that contains a pie chart of customer invoices

string
getCustomerInvoiceUnpaidOpenTable(int $maxCount = 500, int $socid = 0)

Return a HTML table that contains of unpaid customers invoices

string
getCustomerOrderPieChart(int $socid = 0)

Return a HTML table that contains a pie chart of sales orders

string
getCustomerProposalPieChart(int $socid = 0)

Return a HTML table that contains a pie chart of customer proposals

stdclass|bool
getDParameters(stdClass $part)

Array with joined files

string
getDecodeValue(string $message, int $coding)

Decode content of a message

array{date_start: int, date_end: int, pastmonthyear: int, pastmonth: int}
getDefaultDatesForTransfer()

Return Default dates for transfer based on periodicity option in accountancy setup

getDefaultImageSizes()

Return default values for image sizes

array<string, string>
getDetails(string $token)

Prepares the parameters for the GetExpressCheckoutDetails API Call.

string
getDictionaryValue(string $tablename, string $field, int $id, bool $checkentity = false, string $rowidfield = 'rowid')

Return the value of a filed into a dictionary for the record $id.

string
getDictvalue(string $tablename, string $field, int $id, bool $checkentity = false, string $rowidfield = 'rowid')

Return value from dictionary

array{result: array{result_code: string, result_label: string}, document?: array{filename: string, mimetype: string, content: string, length: int}}
getDocument(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, string $modulepart, string $file, string $refname = '')

Method to get a document by webservice

string
getDolCurrency()

Return the main currency ('EUR', 'USD', ...)

string
getDolDBType()

Return the current entity

string
getDolDefaultContextPage(string $s)

Return the default context page string

int
getDolEntity()

Return the current entity

bool
getDolGlobalBool(string $key, bool $default = false)

Return a Dolibarr global constant boolean value.

float
getDolGlobalFloat(string $key, float $default = 0)

Return a Dolibarr global constant float value.

int
getDolGlobalInt(string $key, int $default = 0)

Return a Dolibarr global constant int value.

string
getDolGlobalString(string $key, string|int|float $default = '')

Return a Dolibarr global constant string value

string
getDolOptimizeSmallScreen()

Return if render must be optimized for small screen

int
getDolUserInt(string $key, int $default = 0, User $tmpuser = null)

Return Dolibarr user constant int value

string
getDolUserString(string $key, string|int|float $default = '', User $tmpuser = null)

Return Dolibarr user constant string value

getDoliDBInstance(string $type, string $host, string $user, string $pass, string $name, int $port)

Return a DoliDB instance (database handler).

string
getDomainFromURL(string $url, int $mode = 0)

Function get second level domain name.

string
getDraftSupplierTable(int $maxCount = 500, int $socid = 0)

Return a HTML table that contains a list with customer invoice drafts

string
getDraftTable(int $maxCount = 500, int $socid = 0)

Return a HTML table that contains a list with customer invoice drafts

getElementProperties($elementType)

Get an array with properties of an element.

getEntity($element, int<0, 1> $shared = 1, $currentobject = null)

Get list of entity id to use.

string[]
getExecutableContent()

Return array of extension for executable files of text files that can contains executable code.

string
getFieldErrorIcon(string $fieldValidationErrorMsg)

get field error icon

string
getFileData(int $jk, string $fpos, int $type, Connection $mbox)

Get content of a joined file from its position into a given email

array{insignature: string[], missing?: array<array{filename: string, expectedhash: string, expectedsize: string, algo: string}>, updated: array<array{filename: string, expectedhash: string, expectedsize: string, hash: string, algo: string}>}
getFilesUpdated(array{}|array{insignature: string[], missing?: array<array{filename: string, expectedhash: string, expectedsize: string, algo: string}>, updated: array<array{filename: string, expectedhash: string, expectedsize: string, hash: string, algo: string}>} $file_list, SimpleXMLElement $dir, string $path = '', string $pathref = '', string[] $checksumconcat = array())

Function to get list of updated or modified files.

string[]
getFirstDayOfEachWeek(string[] $TWeek, $year)

Return array of first day of weeks.

getFormeJuridiqueLabel(string $code)

Return the name translated of juridical status.

string
getFromFile(string $file, string $start, string $end, string $excludestart = '', int<0, 1> $includese = 0)

Search a string and return all lines needed from file. Does not include line $start nor $end

int
getGMTEasterDatetime(int $year)

Return the easter day in GMT time.

array<string|int, object|object[]>|int<-1, -1>
getGroupedEval(object[] $objects)

Grouped rows with same ref in array

string
getHashUniqueIdOfRegistration()

Return a hash unique identifier of the registration

getHelpParamFor($helppagename, Translate $langs)

Return helpbaseurl, helppage and mode

string
getHtmlOfLayout(string $name)

Get empty html

string
getIbanHumanReadable(Account $account)

Returns the iban human readable

string
getImageFileNameForSize(string $file, string $extName, string $extImgTarget = '')

Return the filename of file to get the thumbs

string
getImageFromHtmlContent(string $htmlContent, int $imageNumber = 1)

Return the URL of an image found into a HTML content.

getImagePublicURLOfObject($object, $no = 1, $extName = '', $cover = 1)

Return the public image URL of an object.

string[]
getImgPictoConv(string $mode = 'fa')

Get array to convert the Dolibarr picto keys into Font awesome keys

string[]
getImgPictoNameList()

Get all usage icon key usable for img_picto(..., key)

array{result: array{result_code: string, result_label: string}}
getInvoice(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $id = 0, string $ref = '', string $ref_ext = '')

Get invoice from id, ref or ref_ext.

array{result: array{result_code: string, result_label: string}}
getInvoicesForThirdParty(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $idthirdparty)

Get list of invoices for third party

string
getLabelSpecialCode(int $idcode)

Make content of an input box selected when we click into input field.

?string
getLanguageCodeFromCountryCode(string $countrycode)

Return default language from country code.

string[]
getLastDayOfEachWeek(string[] $TWeek, $year)

Return array of last day of weeks.

string
getLatestEditTable(int $maxCount = 5, int $socid = 0)

Return a HTML table that contains a list with latest edited customer invoices

string
getLicenceHeader(User $user, Translate $langs, int $now)

Produce copyright replacement string for user

mixed
getListActionCommType(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication)

Get getListActionCommType

array<int|string, mixed>
getListForAIRephraseStyle()

Get list for AI style of writing

array<int|string, mixed>
getListForAISummarize()

Get list for AI summarize

array<string, array<string, string>>
getListOfAIFeatures()

Prepare admin pages header

array<int|string, mixed>
getListOfAIServices()

Get list of available ai services

array{result: array{result_code: string, result_label: string}}
getListOfGroups(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication)

getListOfGroups

array
getListOfHtmlBooleanAttributes()

Returns a list of HTML boolean attributes.

getListOfModels($db, string $type, $maxfilenamelength = 0, $showempty = 0)

Return list of activated modules usable for document generation

string
getListOfPossibleImageExt($acceptsvg = 0)

Return if a filename is file name of a supported image format

array{result: array{result_code: string, result_label: string}}
getListOfProductsOrServices(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array<string, mixed> $filterproduct)

getListOfProductsOrServices

array{result: array{result_code: string, result_label: string}}
getListOfThirdParties(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array<string, mixed> $filterthirdparty)

getListOfThirdParties

getLocalTaxesFromRate(float|string $vatrate, $local, $buyer, $seller, $firstparamisid = 0)

Get type and rate of localtaxes for a particular vat rate/country of a thirdparty.

getLoginMethod()

Return list of login method of third party module.

array{0: float, 1: float, 2: float}
getMarginInfos(float $pv_ht, float $remise_percent, float $tva_tx, float $localtax1_tx, float $localtax2_tx, int $fk_pa, float $pa_ht)

Return an array with margins information of a line

array{max: string, maxmin: mixed, maxphptoshow: int|string, maxphptoshowparam: ""|"post_max_size"|"upload_max_filesize"}
getMaxFileSizeArray()

Return the max allowed for file upload.

string
getModuleDirForApiClass(string $moduleobject)

Get name of directory where the api_...class.php file is stored

getMultidirOutput($object, $module = '', $forobject = 0, $mode = 'output')

Return the full path of the directory where a module (or an object of a module) stores its files.

string|null
getMultidirTemp(CommonObject $object, string $module = '', int $forobject = 0)

Return the full path of the directory where a module (or an object of a module) stores its temporary files.

string|null
getMultidirVersion(CommonObject $object, string $module = '', int $forobject = 0)

Return the full path of the directory where a module (or an object of a module) stores its versioned files.

string
getNav(array<string, array{id: string, rank: int, url: string|false, name: string, group: string, override?: int<0, 1>, children?: array<array{id: string, rank: int, url: string, name: string, group: string, override?: int<0, 1>}>}>|user_logout, array{id: string, rank: int, url: string, name: string}> $Tmenu)

Get nav menu

string
getNavItem(array{id: string, rank: int, url: string, name: string, group: string, override?: int<0, 1>, children?: array<array{id: string, rank: int, url: string, name: string, group: string, override?: int<0, 1>, active?: bool, separator?: bool}>} $item, int $deep = 0)

Get nav item

int
getNbOfImagePublicURLOfObject(object $object)

Return nb of images known into inde files for an object;

array<string, mixed>|int<-1, -1>
getNewsDetailsById(string $postId)

Retrieves the details of a news post by its ID.

array{date_start: int, date_end: int}|null
getNextFiscalYear(DoliDB $db, int $after_date, "tzserver"|"gmt" $gm = 'tzserver')

Get next fiscal year period after a given date

string
getNonce()

Return a random string to be used as a nonce value for js

string
getNumberInvoicesPieChart(string $mode)

Return an HTML table that contains a pie chart of the number of customers or supplier invoices

int|null
getObjectSocId(object $obj)

Get the socid of an object, supporting legacy attribute names.

string
getOnlinePaymentUrl(int $mode, string $type, string $ref = '', int|float $amount = 0, string $freetag = 'your_tag', int|string $localorexternal = 1)

Return string with full Url

string
getOnlineSignatureUrl(int $mode, string $type, string $ref = '', int $localorexternal = 1, CommonObject $obj = null)

Return string with full Url

string
getOpenTable(int $maxCount = 500, int $socid = 0)

Return a HTML table that contains a list with open (unpaid) customer invoices

array{result: array{result_code: string, result_label: string}}
getOrder(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $id = 0, string $ref = '', string $ref_ext = '')

Get order from id, ref or ref_ext.

array{result: array{result_code: string, result_label: string}}
getOrdersForThirdParty(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $idthirdparty)

Get list of orders for third party

WebsitePage[], code?: string, message?: string}
getPagesFromSearchCriterias(string $type, string $algo, string $searchstring, int $max = 25, string $sortfield = 'date_creation', "DESC"|"ASC" $sortorder = 'DESC', string $langcode = '', array<string, mixed> $otherfilters = [], int<-1, 1> $status = 1)

Return list of containers object that match a criteria.

stdClass[]|false
getParts(stdClass $structure)

Get parts of a message

string
getPaypalPaymentUrl(int $mode, string $type, string $ref = '', int $amount = '9.99', string $freetag = 'your_free_tag')

Return string with full Url

string
getPictoForType(string $key, string $morecss = '')

Return the picto for a data type

string
getPieChart(int $socid = 0)

Return a HTML table that contains a pie chart of customer invoices

array<string, mixed>|int<-1, -1>
getProductForEmailTemplate(int $id)

Retrieve and return product for mail template.

array{product?: mixed[], result: array{result_code: string, result_label: string}}
getProductOrService(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $id = 0, string $ref = '', string $ref_ext = '', string $lang = '')

Get produt or service

array|int[]
getProducts(int $order_id)

getProducts

array{result: array{result_code: string, result_label: string}}
getProductsForCategory(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $id, string $lang = '')

Get list of products for a category

array{result: array{result_code: string, result_label: string}}
getProject(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, string $id = '', string $ref = '')

Get a project

array<array{filename: string, position: int, url: string}>
getPublicFilesOfObject(object $object)

Return array with list of all public files of a given object.

string
getPublicJobPositionUrl(int $mode, string $ref = '', int $localorexternal = 0)

Return string with full Url

string
getPurchaseInvoiceLatestEditTable(int $maxCount = 5, int $socid = 0)

Return a HTML table that contains a list with latest edited supplier invoices

string
getPurchaseInvoicePieChart(int $socid = 0)

Return a HTML table that contains a pie chart of supplier invoices

string
getPurchaseInvoiceUnpaidOpenTable(int $maxCount = 500, int $socid = 0)

Return a HTML table that contains of unpaid purchase invoices

getRandomPassword($generic = false, $replaceambiguouschars = null, $length = 32)

Return a generated password using default module

string
getRankOrderResults(object $obj)

No description

string
getResultColumn(string $name, array $activated, array $loaded, array $functions, string $optional = '')

Return a result column with a translated result text

string
getRootURLFromURL(string $url)

Function root url from a long url For example: https://www.abc.mydomain.com/dir/page.html return 'https://www.abc.mydomain.com' For example: https://www.abc.mydomain.com/ return 'https://www.abc.mydomain.com' For example: http://www.abc.mydomain.com/ return 'http://www.abc.mydomain.com'

float
getServerTimeZoneInt(string $refgmtdate = 'now')

Return server timezone int.

string
getServerTimeZoneString()

Return server timezone string

getSkillForJob($fk_job)

Allow to get skill(s) of a job

stdClass>
getSkillForUsers($TUser)

Allow to get skill(s) of a user

getSoapParams()

Return array to use for SoapClient constructor

string
getSocialNetworkHeaderCards(?array<string, mixed> $params = null)

Return HTML content to add as header card for an article, news or Blog Post or home page.

string
getSourceDocRef(array<string, null|int|float|string> $val, string $typerecord)

Return source for doc_ref of a bank transaction

getState($id, "0"|"1"|"2"|"all" $withcode = '0', $dbtouse = null, $withregion = 0, $outputlangs = null, $entconv = 1)

Return state translated from an id. Return value is always utf8 encoded and without entities.

mixed
getStaticMember(string $class, string $member)
deprecated

Function to return value of a static property when class name is dynamically defined (not hard coded).

string
getStripePaymentUrl(int $mode, string $type, string $ref = '', int $amount = '9.99', string $freetag = 'your_free_tag')

Return string with full Url

string
getStructuredData(string $type, array<string, mixed> $data = array())

Return HTML content to add structured data for an article, news or Blog Post. Use the json-ld format.

array{result: array{result_code: string, result_label: string}}
getSupplierInvoice(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $id = 0, string $ref = '', string $ref_ext = '')

Get invoice from id, ref or ref_ext

array{result: array{result_code: string, result_label: string}}
getSupplierInvoicesForThirdParty(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $idthirdparty)

Get list of invoices for third party

array<string, array<string, string>>
getSupportedOauth2Array()

Return array of tabs to use on pages to setup cron module.

string
getTableColumn(string $name, array $list)

Return a table column with a indicator (okay or warning), based on the given name and list

string
getTableColumnFunction(array $functions)

Return a table column with a indicator (okay or warning), based on the given functions to check

string
getTaskProgressBadge(Task $task, string $label = '', string $tooltip = '')

No description

string
getTaskProgressView(Task $task, bool|string $label = true, bool|string $progressNumber = true, bool $hideOnProgressNull = false, bool $spaced = false)

No description

getTaxesFromId(float|string $vatrate, $buyer = null, $seller = null, $firstparamisid = 1)

Get tax (VAT) main information from Id.

array{result: array{result_code: string, result_label: string}}
getThirdParty(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, string $id = '', string $ref = '', string $ref_ext = '', string $barcode = '', string $profid1 = '', string $profid2 = '')

Get a thirdparty

array
getTicketActionCommEcmList(ActionComm $object)

getTicketActionCommEcmList

string
getTicketTimelineIcon(ActionComm $actionstatic, array $histo, int $key)

Get timeline icon

string
getTimelineIcon(ActionComm $actionstatic, array<int, array{percent: int}> $histo, int $key)
deprecated

Get timeline icon

string
getTitleFieldOfList(?string $name, int<0, 2> $thead = 0, string $file = "", string $field = "", string $begin = "", string $moreparam = "", string $moreattrib = "", ?string $sortfield = "", ?string $sortorder = "", $prefix = "", $disablesortlink = 0, $tooltip = '', $forcenowrapcolumntitle = 0)

Get title line of an array

array{http_code: int, content: string, curl_error_no: int, curl_error_msg: string}
getURLContent(string $url, "POST"|"GET"|"HEAD"|"PUT"|"PATCH"|"PUTALREADYFORMATED"|"POSTALREADYFORMATED"|"PATCHALREADYFORMATED"|"DELETE" $postorget = 'GET', string $param = '', int<0, 1> $followlocation = 1, string[] $addheaders = array(), string[] $allowedschemes = array('http', 'https'), int<0, 2> $localurl = 0, int<-1, 1> $ssl_verifypeer = -1, int $timeoutconnect = 0, int $timeoutresponse = 0, array<int, mixed> $otherCurlOptions = array())

Function to get a content from an URL (use proxy if proxy defined).

string
getUrlSondage(string $id, bool $admin = false)

Fonction permettant de générer les URL pour les sondage

mixed
getUser(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $id, string $ref = '', string $ref_ext = '')

Get produt or service

string
getUserRemoteIP(int $trusted = 0)

Return the real IP of remote user.

array<string, string>
getValidOnlinePaymentMethods(string $paymentmethod = '', int $mode = 0)

Return array of valid payment mode

array{result: array{result_code: string, result_label: string}, dolibarr?: string, os?: string, php?: string, webserver?: string}
getVersions(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication)

Full methods code

getWarningDelay($module, string $parmlevel1, $parmlevel2 = '')

Return a warning delay You can use it like this: if (getWarningDelay('module', 'paramlevel1')) It replaces old syntax: if ($conf->module->user->rights->module->level1)

getWeatherStatus($totallate)

get weather status for conf 'MAIN_METEO_LEVELx'

string
getWeekNumber(int $day, int $month, $year)

Return week number.

string[]
getWeekNumbersOfMonth(int $month, $year)

Return array of week numbers.

get_ca($db, $year, $socid)

No description

get_ca_propal($db, $year, $socid)

\file htdocs/lib/accountancy.lib.php \brief Library of accountancy functions \version $Id$

get_date_range($date_start, int $date_end, $format = '', $outputlangs = null, $withparenthesis = 1)

Format output for start and end date

int
get_default_localtax(Societe $thirdparty_seller, Societe $thirdparty_buyer, $local, int $idprod = 0)

Function that return localtax of a product line (according to seller, buyer and product vat rate) If the seller is not subject to VAT, then default VAT=0. Rule/Test ends.

int<0, 1>
get_default_npr(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod = 0, $idprodfournprice = 0)

Function that returns whether VAT must be recoverable collected VAT (e.g.: VAT NPR in France)

float|string
get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer, int $idprod = 0, int $idprodfournprice = 0)

Function that return vat rate of a product line (according to seller, buyer and product vat rate) VATRULE 0: If we are in mode SERVICE_ARE_ECOMMERCE_200238EC and customer is not a company with a vat id, we use default product VAT in buyer country VATRULE 1: If seller does not use VAT, default VAT is 0. End of rule.

get_exdir(string|int $num, int $level, $alpha, $withoutslash, $object, $modulepart = '')

Return a path to have a the directory according to object where files are stored.

get_htmloutput_errors($mesgstring = '', string[] $mesgarray = array(), $keepembedded = 0)

Get formatted error messages to output (Used to show messages on html output).

string
get_htmloutput_mesg(string $mesgstring = '', string[] $mesgarray = [], $style = 'ok', $keepembedded = 0)

Get formatted messages to output (Used to show messages on html output).

get_interest_factor($year_term, $monthly_interest_rate)

No description

void
get_left_menu_accountancy(string $mainmenu, Menu $newmenu, int $usemenuhider = 1, string $leftmenu = 'none', int $type_user = 0)

Get left COMPTA-FINANCIAL (accountancy)

void
get_left_menu_bank(string $mainmenu, Menu $newmenu, int $usemenuhider = 1, string $leftmenu = 'none', int $type_user = 0)

Get left Menu BANK

void
get_left_menu_billing(string $mainmenu, Menu $newmenu, int $usemenuhider = 1, string $leftmenu = 'none', int $type_user = 0)

Get left COMPTA-FINANCIAL

void
get_left_menu_commercial(string $mainmenu, Menu $newmenu, int $usemenuhider = 1, string $leftmenu = 'none', int $type_user = 0)

Get left Menu COMMERCIAL (propal, commande, supplier_proposal, supplier_order, contrat, ficheinter)

void
get_left_menu_home(string $mainmenu, Menu $newmenu, int $usemenuhider = 1, string $leftmenu = 'none', int $type_user = 0)

Get left Menu HOME

void
get_left_menu_hrm(string $mainmenu, Menu $newmenu, int $usemenuhider = 1, string $leftmenu = 'none', int $type_user = 0)

Get left Menu HRM

void
get_left_menu_members(string $mainmenu, Menu $newmenu, int $usemenuhider = 1, string $leftmenu = 'none', int $type_user = 0)

Get left Menu MEMBERS

void
get_left_menu_mrp(string $mainmenu, Menu $newmenu, int $usemenuhider = 1, string $leftmenu = 'none', int $type_user = 0)

Get left Menu PRODUCTS-SERVICES MRP - GPAO

void
get_left_menu_products(string $mainmenu, Menu $newmenu, int $usemenuhider = 1, string $leftmenu = 'none', int $type_user = 0)

Get left Menu PRODUCTS-SERVICES

void
get_left_menu_projects(string $mainmenu, Menu $newmenu, int $usemenuhider = 1, string $leftmenu = 'none', int $type_user = 0)

Get left Menu PROJECTS

void
get_left_menu_thridparties(string $mainmenu, Menu $newmenu, int $usemenuhider = 1, string $leftmenu = 'none', int $type_user = 0)

Get left Menu THIRDPARTIES

void
get_left_menu_tools(string $mainmenu, Menu $newmenu, int $usemenuhider = 1, string $leftmenu = 'none', int $type_user = 0)

Get left Menu TOOLS

get_localtax($vatrate, int $local, $thirdparty_buyer = null, $thirdparty_seller = null, $vatnpr = 0)

Return localtax rate for a particular VAT rate, when selling a product with vat $vatrate, from a $thirdparty_buyer to a $thirdparty_seller Note: This function get information into the table llx_tva using the VAT rate as key.

string
get_localtax_by_third(int $local)

Get values of localtaxes (1 or 2) for company country for the common vat with the highest value

string
get_next_value(DoliDB $db, string $mask, string $table, string $field, string $where = '', null|Societe|"" $objsoc = '', int|"" $date = '', string $mode = 'next', bool $bentityon = true, User $objuser = null, ?string $forceentity = null, BookKeeping $objbookkeeping = null)

Return last or next value for a mask (according to area we should not reset)

get_product_localtax_for_country($idprod, int $local, $thirdpartytouseforcountry)

Return localtax vat rate of a product in a particular country or default country vat if product is unknown

get_product_vat_for_country(int $idprod, $thirdpartytouseforcountry, int $idprodfournprice = 0)

Return vat rate of a product in a particular country, or default country vat if product is unknown.

string
get_server_name()

get_server_name

get_soc_file_array(int $fk_soc, $module_get = false, $sortorder = false, $excludefiles = false)

Scan a directory and return a array of files/directories from a selection.

string
get_string_between(string $string, string $start, string $end)

Get string from "$start" up to "$end"

get_tz_array()

Return an array with timezone values

getablenamefromfield($code, string $sqlmaxforexport)

Return table name of an alias. For this, we look for the "tablename as alias" in sql string.

int
getnewkey(array<int, mixed|mixed[]> $fieldssource, array<int, mixed|mixed[]> $listofkey)

Return not used field number

array<array{0: string, 1: string, 2: string}>
group_prepare_head(UserGroup $object)

Prepare array with list of tabs

string
gzdecode(string $data)

Gzdecode

array<string, string>
hash_call(string $methodName, string $nvpStr)

hash_call: Function to perform the API call to PayPal using API signature

string
hexbin(string $hexa)

Convert an hexadecimal string into a binary string

array<array{0: string, 1: string, 2: string}>
holiday_admin_prepare_head()

Return array head with list of tabs to view object information

array<array{0: string, 1: string, 2: string}>
holiday_prepare_head($object)

Return array head with list of tabs to view object information

array<array{0: string, 1: string, 2: string}>
hrmAdminPrepareHead()

Prepare admin pages header

array<array{0: string, 1: string, 2: string}>
hrm_admin_prepare_head()

Return array head with list of tabs to view object information

void
htmlPrintOnlineFooter(Societe $fromcompany, Translate $langs, int $addformmessage = 0, string $suffix = '', null|CommonObject|CommonHookActions $object = null)

Show footer of company in HTML public pages

void
htmlPrintOnlineHeader(Societe $mysoc, Translate $langs, int|string $showlogo = 1, string $alttext = '', string $subimageconst = '', string $altlogo1 = '', string $altlogo2 = '')

Show the header of a company in HTML public pages

void
htmlPrintOnlinePaymentFooter(Societe $fromcompany, Translate $langs, int $addformmessage = 0, string $suffix = '', object $object = null)

Show footer of company in HTML pages

httponly_accessforbidden(string $message = '1', int $http_response_code = 403, $stringalreadysanitized = 0)

Show a message to say access is forbidden and stop program.

string
hundreds2text(int $hundreds, int $tens, int $units)

hundreds2text

array<array{0: string, 1: string, 2: string}>
ihm_prepare_head()

Prepare array with list of tabs

image_format_supported($file, int $acceptsvg = 0)

Return if a filename is file name of a supported image format

string
imgAddEditDeleteButton(string $htmlid, string $urledit, string $urldelete)

Beautify an image by adding a link edit and delete on image

string
img_action(string $titlealt, string $numaction, string $picto = '', $moreatt = '')

Show logo action

string
img_allow(string $allow, string $titlealt = 'default')

Show tick logo if allowed

string
img_credit_card(string $brand, $morecss = 'fa-2x inline-block valignmiddle')

Return image of a credit card according to its brand name

img_delete($titlealt = 'default', string $other = 'class="pictodelete"', $morecss = '')

Show delete logo

string
img_down(string $titlealt = 'default', int $selected = 0, $moreclass = '')

Show down arrow logo

string
img_edit(string $titlealt = 'default', int $float = 0, string $other = '')

Show logo edit/modify fiche

string
img_edit_add(string $titlealt = 'default', string $other = '')

Show logo "+"

string
img_edit_remove(string $titlealt = 'default', string $other = '')

Show logo "-"

string
img_error(string $titlealt = 'default')

Show error logo

img_help($usehelpcursor = 1, int|string $usealttitle = 1)

Show help logo with cursor "?"

string
img_info(string $titlealt = 'default')

Show info logo

string
img_left(string $titlealt = 'default', int $selected = 0, string $moreatt = '')

Show left arrow logo

string
img_mime(string $file, $titlealt = '', $morecss = '')

Show MIME img of a file

string
img_next(string $titlealt = 'default', string $moreatt = '')

Show next logo

img_object($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $srconly = 0, $notitle = 0, $allowothertags = array())

Show a picto called object_picto (generic function)

img_pdf($titlealt = 'default', int $size = 3)

Show pdf logo

string
img_phone(string $titlealt = 'default', int $option = 0)

Show phone logo.

img_picto(string $titlealt, string $picto, string $moreatt = '', int<0, 1> $pictoisfullpath = 0, int $srconly = 0, $notitle = 0, $alt = '', $morecss = '', $marginleftonlyshort = 2, $allowothertags = array())

Show picto whatever it's its name (generic function)

string
img_picto_common(string $titlealt, string $picto, string $moreatt = '', int $pictoisfullpath = 0, $notitle = 0)

Show picto (generic function)

string
img_previous(string $titlealt = 'default', string $moreatt = '')

Show previous logo

img_printer($titlealt = "default", string $other = '')

Show printer logo

string
img_right(string $titlealt = 'default', int $selected = 0, string $moreatt = '')

Show right arrow logo

img_searchclear($titlealt = 'default', string $other = '')

Show search logo

img_split($titlealt = 'default', string $other = 'class="pictosplit"')

Show split logo

string
img_up(string $titlealt = 'default', int $selected = 0, $moreclass = '')

Show top arrow logo

string
img_view(string $titlealt = 'default', int $float = 0, string $other = 'class="valignmiddle"')

Show logo view card

string
img_warning(string $titlealt = 'default', string $moreatt = '', $morecss = 'pictowarning')

Show warning logo

string
img_weather(string $titlealt, string|int $picto, string $moreatt = '', int $pictoisfullpath = 0, $morecss = '')

Show weather picto

array<array{0: string, 1: string, 2: string}>
import_prepare_head(string $param, int $maxstep = 0)

Function to return list of tabs for import pages

void
includeContainer(string $containerref, int $once = 0, int $cachedelay = 0, string $cachekey = '')

Execute content of a php page and report result to be included into another page.

string
info_admin(string $text, int $infoonimgalt = 0, int $nodiv = 0, $admin = '1', $morecss = 'hideonsmartphone', $textfordropdown = '', $picto = '')

Show information in HTML for admin users or standard users

void
install_usage(string $program, string $header)

Print the usage when executing scripts from install/.

array
intracommReportAdminPrepareHead()

Prepare array with list of admin tabs

array
intracommReportPrepareHead($object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
intracommreportAdminPrepareHead()

Prepare admin pages header

array<array{0: string, 1: string, 2: string}>
intracommreportPrepareHead(IntraCommReport $object)

Prepare array of tabs for IntraCommReport

array<array{0: string, 1: string, 2: string}>
inventoryAdminPrepareHead()

Define head array for tabs of inventory tools setup pages

array<array{0: string, 1: string, 2: string}>
inventoryPrepareHead($inventory, string $title = 'Inventory', $get = '')

Define head array for tabs of inventory tools setup pages

inventorySelectProducts($inventory)

No description

array<array{0: string, 1: string, 2: string}>
invoice_admin_prepare_head()

Return array head with list of tabs to view object information.

array<array{0: string, 1: string, 2: string}>
invoice_rec_prepare_head(FactureRec $object)

Return array head with list of tabs to view object information.

bool
isAFileWithExecutableContent(string $filename)

Return if a file can contains executable content

bool
isALNEQualifiedVersion(int<0, 1> $ignoredev = 0, int<0, 1> $ignoremodule = 0)

Return if the version is a candidate version to get the LNE certification and if the prerequisites are OK in production to be switched to LNE certified mode.

bool
isALNERunningVersion(int $blockedlogtestalreadydone = 0)

Return if the application is executed with the LNE requirements on.

bool
isASecretKey($keyname)

Return if string has a name dedicated to store a secret

bool
isAValidEAN13(string $ean)

Check if EAN13 code is valid

bool
isBlockedLogUsed(int<0, 1> $ignoresystem = 0)

Return if the blocked log was already used to block some events.

bool
isDolTms(int|string|null $timestamp)

isDolTms check if a timestamp is valid.

bool
isHTTPS()

Return if we are using a HTTPS connection Check HTTPS (no way to be modified by user but may be empty or wrong if user is using a proxy) Take HTTP_X_FORWARDED_PROTO (defined when using proxy) Then HTTP_X_FORWARDED_SSL

string
isIPAllowed(string $iptocheck, int $localurl)

Is IP allowed

bool
isInEEC($object)

Return if a country of an object is inside the EEC (European Economic Community)

bool
isInSEPA($object)

Return if a country of an object is inside the SEPA zone (Single Euro Payment Area)

bool
isModEnabled(string $module)

Is Dolibarr module enabled

bool
isOnlyOneLocalTax(int $local)

Return true if LocalTax (1 or 2) is unique.

bool
isRegistrationDataSaved()

Return if the KYC mandatory parameters are set

isStringVarMatching(string $var, $regextext, $matchrule = 1)

Check if a variable with name $var start with $regextext.

bool
isValidEmail(string $address, $acceptsupervisorkey = 0, $acceptuserkey = 0)

Return true if email syntax is ok.

bool
isValidLuhn($str)

Check if a string passes the Luhn algorithm test.

int
isValidMXRecord(string $domain)

Return if the domain name has a valid MX record.

int
isValidMailDomain(string $mail)

Return true if email has a domain name that can be resolved to MX type.

bool
isValidPhone($phone)

Return true if phone number syntax is ok TODO Decide what to do with this

bool
isValidSiren($siren)

Check the syntax validity of a SIREN.

bool
isValidSiret($siret)

Check the syntax validity of a SIRET.

isValidTinForBE(string $str)

Check the syntax validity of a Belgium (BE) Tax Identification Number (TIN).

isValidTinForDZ(string $str)

Check the syntax validity of an Algerian (DZ) Tax Identification Number (TIN).

int<-4, 3>
isValidTinForES($str)

Check the syntax validity of a Spanish (ES) Tax Identification Number (TIN), where:

  • NIF = Número de Identificación Fiscal (used for residents only before 2008. Used for both residents and companies since 2008.)
  • CIF = Código de Identificación Fiscal (used for companies only before 2008. Replaced by NIF since 2008.)
  • NIE = Número de Identidad de Extranjero

isValidTinForPT(string $str)

Check the syntax validity of a Portuguese (PT) Tax Identification Number (TIN).

int
isValidUrl(string $url, $http = 0, $pass = 0, $port = 0, $path = 0, $query = 0, $anchor = 0)

Url string validation <http[s]> :// [user[:pass]@] hostname [port] [/path] [?getquery] [anchor]

int
isValidVATID(Societe $company)

Check if VAT numero is valid (check done on syntax only, no database or remote access)

int<0, 2>
isVisibleToUserType(int<0, 1> $type_user, array{enabled: int<0, 1>, module?: string, perms: string} $menuentry, string[] $listofmodulesforexternal)

Function to test if an entry is enabled or not

bool
is_countable(mixed $c)

function is_countable (to remove when php version supported will be >= 7.3)

bool
is_empty(?mixed $var, bool $allow_false = false, bool $allow_ws = false)

Check if a value is empty with some options

bool
is_excluded(string $filename)

check if that filename is concerned by exclude filter

int
is_in_subtree(mixed $fulltree, mixed $parentid, mixed $childid)

Return if a child id is in descendance of parentid

int
is_ip(string $ip)

This function evaluates a string that should be a valid IPv4 Note: For ip 169.254.0.0, it returns 0 with some PHP (5.6.24) and 2 with some minor patches of PHP (5.6.25). See https://github.com/php/php-src/pull/1954.

bool
issetAndNoEmpty(string $name, ?array<string, null|mixed|mixed[]> $tableau = null)

Fonction vérifiant l'existance et la valeur non vide d'une clé d'un tableau

array<array{0: string, 1: string, 2: string}>
jobPrepareHead(Job $object)

Prepare array of tabs for Job

void
journalHead(string $nom, string $variant, string $period, string $periodlink, string $description, int $builddate, string $exportlink = '', array<string, mixed> $moreparam = array(), string $calcmode = '', $varlink = '', array<string, mixed> $moreoptions = array())

Show header of a page used to transfer/dispatch data in accounting

string
jsUnEscape(string $source)

Same function than javascript unescape() function but in PHP.

mixed
jsonOrUnserialize(string $stringtodecode, bool $assoc = true)

Decode an encoded string. The string can be encoded in json format (recommended) or with serialize (avoid this)

mixed
json_decode(string $json, bool $assoc = false)

Implement json_decode for PHP that does not support it

string
json_encode(mixed $elements)

Implement json_encode for PHP that does not have module enabled.

array<array{0: string, 1: string, 2: string}>
knowledgemanagementAdminPrepareHead()

Prepare admin pages header

array<array{0: string, 1: string, 2: string}>
knowledgerecordPrepareHead(KnowledgeRecord $object)

Prepare array of tabs for KnowledgeRecord

array<array{0: string, 1: string, 2: string}>
ldap_prepare_head()

Initialize the array of tabs for customer invoice

left_menu($menu_array_before, string $helppagename = '', $notused = '', $menu_array_after = array(), $leftmenuwithoutmainarea = 0, $title = '', $acceptdelayedhtml = 0)

Show left menu bar

string
length_accounta(string $accounta)

Return Auxiliary accounting account of thirdparties with defined length

string
length_accountg(string $account)

Return General accounting account with defined length (used for product and miscellaneous)

listOfSessions()

Return list of session

listPublicHoliday($timestampStart, $timestampEnd, $countryCodeOrId = '', $lastday = 0, $excludesaturday = -1, $excludesunday = -1, $excludefriday = -1, $excludemonday = -1)

Return the list of public holidays including Friday, Saturday and Sunday (or not) between 2 dates in timestamp.

string
list_get_product_extrafield(int $fk_object, string $key)

Function return formated extrafield

string
list_get_product_minbuyprice(int $fk_object)

Function return formated min buy price

string
list_get_product_ref(int $fk_object)

Function return formated ref

string
list_get_product_sellprice(int $fk_object)

Function return formated sell price

string
list_get_product_status(int $fk_object, string $field, int $type)

Function return formated product status sell or buy

string
list_get_product_stock(int $fk_object)

Function return formated stock

string
list_get_product_virtual_stock(int $fk_object)

Function return formated virtual stock

void
llxFooter(string $comment = '', string $zone = 'private', int $disabledoutputofmessages = 0)

Empty footer

void
llxFooterPayBox()

Show footer

void
llxFooterPaypal()

Show footer

void
llxFooterSurvey()

Show footer for new member

void
llxFooterTicket()

Show footer for new member

void
llxFooterVierge()

Show footer for new donation

void
llxHeader(string $head = '', string $title = '', string $help_url = '', string $target = '', int $disablejs = 0, int $disablehead = 0, string[]|string $arrayofjs = '', string[]|string $arrayofcss = '', string $morequerystring = '', string $morecssonbody = '', string $replacemainareaby = '', int $disablenofollow = 0, int $disablenoindex = 0)

Empty header

void
llxHeaderPaybox(string $title, string $head = "")

Show header

void
llxHeaderPaypal(string $title, string $head = "")

Show header

void
llxHeaderSubscriptionOk(string $title, string $head = "", int $disablejs = 0, int $disablehead = 0, string[]|string $arrayofjs = [], string[]|string $arrayofcss = [])

Show header for new member

void
llxHeaderSurvey(string $title, string $head = "", int $disablejs = 0, int $disablehead = 0, string[]|string $arrayofjs = [], string[]|string $arrayofcss = [], string $numsondage = '')

Show header for new member

void
llxHeaderTicket(string $title, string $head = "", int<0, 1> $disablejs = 0, int<0, 1> $disablehead = 0, string[] $arrayofjs = [], string[] $arrayofcss = [])

Show http header, open body tag and show HTML header banner for public pages for tickets

void
llxHeaderVierge(string $title, string $head = "", int $disablejs = 0, int $disablehead = 0, string[]|string $arrayofjs = [], string[]|string $arrayofcss = [], string $ws = '')

Show header for new donation

load_fiche_titre(string $title, string $morehtmlright = '', string $picto = 'generic', int<0, 1> $pictoisfullpath = 0, $id = '', $morecssontable = '', string $morehtmlcenter = '', $morecssonpicto = 'widthpictotitle')

Load a title with picto

int
loadconf(string $dolibarr_main_document_root)

Load conf file (file must exists)

array<array{cap_rest: float, cap_rest_str: string, interet: float, interet_str: string, mens: string}>
loanCalcMonthlyPayment(float $mens, float $capital, float $rate, int $numactualloadterm, int $nbterm)

Calculate remaining loan mensuality and interests

array<array{0: string, 1: string, 2: string}>
loan_prepare_head(Loan $object)

Prepare array with list of tabs

void
localtax_pt(DoliDB $db, string $sql, string $date)

print function

array<array{0: string, 1: string, 2: string}>
mailmanspip_admin_prepare_head()

Return array head with list of tabs to view object information

void
main_area($title = '')

Begin main area

make_alpha_from_numbers($number)

No description

make_substitutions(string $text, $substitutionarray, $outputlangs = null, $converttextinhtmlifnecessary = 0)

Make substitution into a text string, replacing keys with vals from $substitutionarray (oldval=>newval), and texts like (TranslationKey|langfile), [CONSTANTKEY] or [CONSTANTKEY|urlencode] are also replaced.

string
makesalt($type = CRYPT_SALT_LENGTH)

Initialise the salt for the crypt function.

array<array{0: string, 1: string, 2: string}>
marges_admin_prepare_head()

Define head array for tabs of marges tools setup pages

array<array{0: string, 1: string, 2: string}>
marges_prepare_head()

Return array of tabs to used on pages for third parties cards.

string|-1
measuringUnitString(int $unitid, string $measuring_style = '', $unitscale = null, $use_short_label = 0, $outputlangs = null)

Return translation label of a unit key

int
measuring_units_cubed(int $unit)

Transform a given unit scale into the cube of that unit, if known

int
measuring_units_squared(int $unitscale)

Transform a given unit scale into the square of that unit, if known.

string
measuring_units_string(?int $unitscale = null, string $measuring_style = '', int $unitid = 0, $use_short_label = 0, $outputlangs = null)

Return translation label of a unit key.

member_admin_prepare_head()

Return array head with list of tabs to view object information

array<int, array<int, string>>
member_prepare_head(Adherent $object)

Return array head with list of tabs to view object information

array<int, array<int, string>>
member_stats_prepare_head($object)

Return array head with list of tabs to view object stats information

array<int, array<int, string>>
member_type_prepare_head(AdherentType $object)

Return array head with list of tabs to view object information

int
members_card_pdf_create(DoliDB $db, array<array{textleft: string, textheader: string, textfooter: string, textright: string, id: int, ref: string, photo: string}> $arrayofmembers, string $modele, Translate $outputlangs, string $outputdir = '', string $template = 'standard_member', $filename = 'tmp_cards')

Create a document for visit card according to template defined in ADHERENT_CARDS_ADDON_PDF

int<-1, 1>
menuSortInv(array{rank?: int} $a, array{rank?: int} $b)

Sort menu uasort callback function to Sort menu fields

stdClass>
mergeSkills(stdClass> $TSkill1, stdClass> $TSkill2)

Create an array of lines [ skillLabel,description, maxrank on group1 , minrank needed for this skill ]

void
migrate_accountingbookkeeping(int $entity)

Migrate Ref in bookkeeping lines

void
migrate_actioncomm_element(DoliDB $db, Translate $langs, Conf $conf)

Migrate link stored into fk_xxxx into fk_element and elementtype

void
migrate_apiresttokens()

Migrate API key in oauth_token table

int
migrate_blockedlog_add_hmac_key()

Add the HMAC key for blockedlog v2

void
migrate_categorie_association(DoliDB $db, Translate $langs, Conf $conf)

Migrate categorie association

void
migrate_clean_association(DoliDB $db, Translate $langs, Conf $conf)

Delete duplicates in table categorie_association

void
migrate_commande_deliveryaddress(DoliDB $db, Translate $langs, Conf $conf)

Migration du champ fk_adresse_livraison dans expedition 2.6 -> 2.7

void
migrate_commande_expedition(DoliDB $db, Translate $langs, Conf $conf)

Correspondence des expeditions et des commandes clients dans la table llx_co_exp

void
migrate_commande_livraison(DoliDB $db, Translate $langs, Conf $conf)

Correspondence des livraisons et des commandes clients dans la table llx_co_liv

void
migrate_contacts_socialnetworks()

Migrate contacts fields facebook and co to socialnetworks Can be called only when version is 10.0.* or lower. Fields does not exists after.

void
migrate_contractdet_rank()

Migrate Rank into contract line

void
migrate_contracts_date1(DoliDB $db, Translate $langs, Conf $conf)

Mise a jour des date de contrats non renseignees

void
migrate_contracts_date2(DoliDB $db, Translate $langs, Conf $conf)

Update contracts with date min real if service date is lower

void
migrate_contracts_date3(DoliDB $db, Translate $langs, Conf $conf)

Mise a jour des dates de creation de contrat

void
migrate_contracts_det(DoliDB $db, Translate $langs, Conf $conf)

Mise a jour des contrats (gestion du contrat + detail de contrat)

void
migrate_contracts_open(DoliDB $db, Translate $langs, Conf $conf)

Reouverture des contrats qui ont au moins une ligne non fermee

void
migrate_customerorder_shipping(DoliDB $db, Translate $langs, Conf $conf)

Migrate order ref_customer and date_delivery fields to llx_expedition

bool
migrate_delete_old_dir(DoliDB $db, Translate $langs, Conf $conf)

Remove deprecated directories

bool
migrate_delete_old_files(DoliDB $db, Translate $langs, Conf $conf)

Delete deprecated files

void
migrate_detail_livraison(DoliDB $db, Translate $langs, Conf $conf)

Migration des details commandes dans les details livraisons

void
migrate_directories(DoliDB $db, Translate $langs, Conf $conf, string $oldname, string $newname)

Migration directory

void
migrate_element_time(DoliDB $db, Translate $langs, Conf $conf)

Migrate duration in seconds

void
migrate_event_assignement(DoliDB $db, Translate $langs, Conf $conf)

Migrate event assignment to owner

void
migrate_event_assignement_contact(DoliDB $db, Translate $langs, Conf $conf)

Migrate event assignment to owner

void
migrate_export_import_profiles(string $mode = 'export')

Migrate export and import profiles to fix field name that was renamed

void
migrate_holiday_path()

Migrate file from old path to new one for users

void
migrate_invoice_export_models()

Invoice exports been shifted (facture_1 => facture_0, facture_2 => facture_1) in version 20, shift export models accordingly

void
migrate_mailing_filespath(Mailing $mailing)

Migrate file from old path to new one for mailing $mailing

void
migrate_members_socialnetworks()

Migrate members fields facebook and co to socialnetworks Can be called only when version is 10.0.* or lower. Fields does not exists after.

void
migrate_menus(DoliDB $db, Translate $langs, Conf $conf)

Migration of menus (use only 1 table instead of 3) 2.6 -> 2.7

void
migrate_mode_reglement(DoliDB $db, Translate $langs, Conf $conf)

Migrate link stored into fk_mode_reglement

void
migrate_modeles(DoliDB $db, Translate $langs, Conf $conf)

Mise a jour des modeles selectionnes

void
migrate_paiementfourn_facturefourn(DoliDB $db, Translate $langs, Conf $conf)

Factures fournisseurs

void
migrate_paiements(DoliDB $db, Translate $langs, Conf $conf)

Records payment links for an invoice in a join table (link n<-->n for payments<-->invoices)

void
migrate_paiements_orphelins_1(DoliDB $db, Translate $langs, Conf $conf)

Repair orphan payments (lost relations due to bugs) Query to check if there are still orphans: select * from llx_paiement as p left join llx_paiement_facture as pf on pf.fk_paiement=p.rowid WHERE pf.rowid IS NULL AND (p.fk_facture = 0 OR p.fk_facture IS NULL)

void
migrate_paiements_orphelins_2(DoliDB $db, Translate $langs, Conf $conf)

Repair orphan payments (lost relations due to bugs) Query to check if there are still orphans: select * from llx_paiement as p left join llx_paiement_facture as pf on pf.fk_paiement=p.rowid WHERE pf.rowid IS NULL AND (p.fk_facture = 0 OR p.fk_facture IS NULL)

migrate_paiements_orphelins_3($db, $langs, $conf)

No description

void
migrate_price_commande(DoliDB $db, Translate $langs, Conf $conf)

Update total of sales order lines

void
migrate_price_commande_fournisseur(DoliDB $db, Translate $langs, Conf $conf)

Update total of purchase order lines

void
migrate_price_contrat(DoliDB $db, Translate $langs, Conf $conf)

Update total of contract lines

void
migrate_price_facture(DoliDB $db, Translate $langs, Conf $conf)

Update total of invoice lines

void
migrate_price_propal(DoliDB $db, Translate $langs, Conf $conf)

Update total of proposal lines

int
migrate_productlot_path()

Migrate file from old path to new one for lot path

void
migrate_project_task_actors(DoliDB $db, Translate $langs, Conf $conf)

Migration de la table llx_projet_task_actors vers llx_element_contact

void
migrate_project_task_time(DoliDB $db, Translate $langs, Conf $conf)

Migrate duration in seconds

void
migrate_project_user_resp(DoliDB $db, Translate $langs, Conf $conf)

Migration du champ fk_user_resp de llx_projet vers llx_element_contact

void
migrate_relationship_tables(DoliDB $db, Translate $langs, Conf $conf, string $table, string $fk_source, string $sourcetype, string $fk_target, string $targettype)

Migration des tables de relation

int
migrate_reload_menu(DoliDB $db, Translate $langs, Conf $conf)

Reload SQL menu file (if dynamic menus, if modified by version)

int
migrate_reload_modules(DoliDB $db, Translate $langs, Conf $conf, array<string, "noboxes"|"newboxdefonly"|"forceactivate"> $listofmodule = array(), int<0, 1> $force = 0)

Disable/Re-enable features modules.

void
migrate_remise_entity(DoliDB $db, Translate $langs, Conf $conf)

Migrate to add entity value into llx_societe_remise

void
migrate_remise_except_entity(DoliDB $db, Translate $langs, Conf $conf)

Migrate to add entity value into llx_societe_remise_except

void
migrate_rename_directories(DoliDB $db, Translate $langs, Conf $conf, string $oldname, string $newname)

Migration directory

void
migrate_reset_blocked_log(DoliDB $db, Translate $langs, Conf $conf)

Migrate to reset the blocked log for V7+ algorithm

void
migrate_shipping_delivery(DoliDB $db, Translate $langs, Conf $conf)

Migrate link stored into fk_expedition into llx_element_element

void
migrate_shipping_delivery2(DoliDB $db, Translate $langs, Conf $conf)

We try to complete field ref_customer and date_delivery that are empty into llx_livraison.

void
migrate_stocks(DoliDB $db, Translate $langs, Conf $conf)

Migration du champ stock dans produits

void
migrate_thirdparties_socialnetworks()

Migrate thirdparties fields facebook and co to socialnetworks Can be called only when version is 10.0.* or lower. Fields does not exists after.

void
migrate_user_photospath()

Migrate file from old path to new one for users

void
migrate_user_photospath2()

Migrate file from old path users/99/file.jpg into users/99/photos/file.jpg

void
migrate_user_rights_entity(DoliDB $db, Translate $langs, Conf $conf)

Migrate to add entity value into llx_user_rights

void
migrate_usergroup_rights_entity(DoliDB $db, Translate $langs, Conf $conf)

Migrate to add entity value into llx_usergroup_rights

void
migrate_users_socialnetworks()

Migrate users fields facebook and co to socialnetworks.

bool
mkdirAndCheck(string $path)

create a directory and check if dir exists

array<array{0: string, 1: string, 2: string}>
moPrepareHead(Mo $object)

Prepare array of tabs for Mo

void
moduleBuilderShutdownFunction()

Add management to catch fatal errors - shutdown handler

array<array{0: string, 1: string, 2: string}>
modulehelp_prepare_head(DolibarrModules $object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
modules_prepare_head(int $nbofactivatedmodules, int $nboftotalmodules, int $nbmodulesnotautoenabled)

Prepare array with list of tabs

moneyMeter($actualValue = 0, $pendingValue = 0, $intentValue = 0)

\brief This function returns the html for the moneymeter.

array<int<1, 12>, string>
monthArray(Translate $outputlangs, $short = 0)

Return array of translated months or selected month.

array<array{0: string, 1: string, 2: string}>
mrpAdminPrepareHead()

Prepare admin pages header

void
mrpCollapseBomManagement()

Manage collapse bom display

array<array{0: string, 1: string, 2: string}>
multicurrencyAdminPrepareHead()

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
multicurrencyLimitPrepareHead(string[] $aCurrencies)

Prepare array with list of currency tabs

array<array{string, string, string}>
mymoduleAdminPrepareHead()

Prepare admin pages header

array<array{string, string, string}>
myobjectPrepareHead(MyObject $object)

Prepare array of tabs for MyObject

newToken()

Return the value of token currently saved into session with name 'newtoken'.

string
num2Alpha(int|string $n)

Return a numeric value into an Excel like column number. So 0 return 'A', 1 returns 'B'..., 26 return 'AA'

int
num_between_day(int $timestampStart, int $timestampEnd, int $lastday = 0)

Function to return number of days between two dates (date must be UTC date !) Example: 2012-01-01 2012-01-02 => 1 if lastday=0, 2 if lastday=1

int|string
num_open_day(int $timestampStart, int $timestampEnd, int $inhour = 0, int $lastday = 0, $halfday = 0, $countryCodeOrId = '')

Function to return number of working days (and text of units) between two dates (working days)

num_public_holiday(int $timestampStart, $timestampEnd, $countryCodeOrId = '', $lastday = 0, $includesaturday = -1, $includesunday = -1, $includefriday = -1, $includemonday = -1)

Return the number of non working days including Friday, Saturday and Sunday (or not) between 2 dates in timestamp.

string
numero_semaine(string $time)

Retourne le numero de la semaine par rapport a une date

array<array{0: string, 1: string, 2: string}>
oauthadmin_prepare_head()

Return array of tabs to used on pages to setup cron module.

string
openid_connect_get_redirect_url()

return the redirect url

string
openid_connect_get_state()

return the current state

string
openid_connect_get_url()

Return authentication url

array<array{0: string, 1: string, 2: string}>
openid_connect_prepare_head()

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
opensurvey_prepare_head(Opensurveysondage $object)

Returns an array with the tabs for the "Opensurvey poll" section It loads tabs from modules looking for the entity Opensurveyso

array<array{0: string, 1: string, 2: string}>
order_admin_prepare_head()

Return array head with list of tabs to view object information.

string|null
ordered(int $product_id)

ordered

array<array{0: string, 1: string, 2: string}>
ordersupplier_prepare_head(CommandeFournisseur $object)

Prepare array with list of tabs

void
pFooter(int $nonext = 0, string $setuplang = '', string $jscheckfunction = '', int $withpleasewait = 0, string $morehtml = '')

Print HTML footer of install pages

void
pHeader(string $subtitle, string $next, string $action = 'set', string $param = '', string $forcejqueryurl = '', string $csstable = 'main-inside')

Show HTML header of install pages

array<string, bool|int|float|string|mixed[]>
parsePropertyString(string $string)

Converts a formatted properties string into an associative array.

string
parse_database_login(string $force_install_databaserootlogin)

Replaces automatic database login by actual value

string
parse_database_pass(string $force_install_databaserootpass)

Replaces automatic database password by actual value

array<array{0: string, 1: string, 2: string}>
partnershipAdminPrepareHead()

Prepare admin pages header

array<array{0: string, 1: string, 2: string}>
partnershipPrepareHead(Partnership $object)

Prepare array of tabs for Partnership

array<array{0: string, 1: string, 2: string}>
payment_expensereport_prepare_head(PaymentExpenseReport $object)

Returns an array with the tabs for the "Expense report payment" section It loads tabs from modules looking for the entity payment

bool
payment_filter(array<string, mixed> $v)

Filter for payment

array<array{0: string, 1: string, 2: string}>
payment_prepare_head(Paiement $object)

Returns an array with the tabs for the "Payment" section It loads tabs from modules looking for the entity payment

array<array{0: string, 1: string, 2: string}>
payment_supplier_prepare_head(Paiement $object)

Returns an array with the tabs for the "Supplier payment" section It loads tabs from modules looking for the entity payment_supplier

array<array{0: string, 1: string, 2: string}>
paypaladmin_prepare_head()

Define head array for tabs of paypal tools setup pages

string
pdfBuildThirdpartyName(Societe|Contact $thirdparty, Translate $outputlangs, int<0, 1> $includealias = 0)

Returns the name of the thirdparty

pdfCertifMention($pdf, Translate $outputlangs, $seller, $default_font_size, $posy, $pdftemplate)

Add legal certificate mention

pdfCertifMentionblockedLog($pdf, Translate $outputlangs, $seller, $default_font_size, $posy, $pdftemplate)

Add legal mention

string
pdfExtractMetadata(string $file, string $field = 'Keywords')

Function to extract metadata from a PDF file by doing a binary parsing of the PDF file

int
pdfGetHeightForHtmlContent(TCPDF $pdf, string $htmlcontent)

Function to try to calculate height of a HTML Content.

pdfGetLineTotalDiscountAmount(Commande|Facture|Propal $object, int $i, $outputlangs, $hidedetails = 0, $multicurrency = 0)

Return line total amount discount.

pdfWriteBlockedLogSignature($pdf, Translate $outputlangs, $page_height, $object, $w, $posx, $posy)

Show header of page for PDF generation

pdf_admin_prepare_head()

Return array head with list of tabs to view object information.

pdf_bank($pdf, Translate $outputlangs, $curx, $cury, $account, $onlynumber = 0, $default_font_size = 10)

Show bank information for PDF generation

pdf_build_address($outputlangs, Societe $sourcecompany, $targetcompany = '', $targetcontact = '', $usecontact = 0, $mode = 'source', $object = null)

Return a string with full address formatted for output on PDF documents

pdf_format_address($outputlangs, $object)

Return a formated address (part address/zip/town/state) according to country rules

bool
pdf_getEncryption(string $pathoffile)

Return if pdf file is protected/encrypted

pdf_getFormat(Translate $outputlangs = null, $mode = 'setup')

Return array with format properties of default PDF format

pdf_getInstance($format = '', string $metric = 'mm', $pagetype = 'P')

Return a PDF instance object. We create a FPDI instance that instantiate TCPDF.

pdf_getLinkedObjects(CommonObject $object, $outputlangs)

Return linked objects to use for document generation.

string
pdf_getPDFFont($outputlangs)

Return font name to use for PDF generation

int
pdf_getPDFFontSize($outputlangs)

Return font size to use for PDF generation

array{width: int, height: int}
pdf_getSizeForImage(string $realpath)

Return dimensions to use for images onto PDF checking that width and height are not higher than maximum (20x32 by default).

array<string, string>
pdf_getSubstitutionArray(Translate $outputlangs, null|string[] $exclude = null, ?object $object = null, int<0, 2> $onlykey = 0, $include = null)

Return array of possible substitutions for PDF content (without external module substitutions).

pdf_getTotalQty(object $object, string $type, $outputlangs)

Return total quantity of products and/or services

pdf_getlinedesc($object, int $i, $outputlangs, $hideref = 0, $hidedesc = 0, $issupplierline = 0)

Return line description translated in outputlangs and encoded into htmlentities and with

pdf_getlinenum(CommonObject $object, int $i, $outputlangs, $hidedetails = 0)

Return line num

string
pdf_getlineprogress(Facture $object, int $i, Translate $outputlangs, int<0, 2> $hidedetails = 0, HookManager $hookmanager = null)

Return line percent

pdf_getlineqty(Delivery|Asset|Commande|Facture|CommandeFournisseur|FactureFournisseur|SupplierProposal|Propal|StockTransfer|MyObject $object, int $i, $outputlangs, $hidedetails = 0)

Return line quantity

pdf_getlineqty_asked(Delivery $object, int $i, $outputlangs, $hidedetails = 0)

Return line quantity asked

pdf_getlineqty_keeptoship(Delivery|Asset|Commande|Facture|CommandeFournisseur|FactureFournisseur|SupplierProposal|Propal|StockTransfer|MyObject $object, int $i, $outputlangs, $hidedetails = 0)

Return line keep to ship quantity

pdf_getlineqty_shipped(Delivery $object, int $i, $outputlangs, $hidedetails = 0)

Return line quantity shipped

pdf_getlineref(CommonObject $object, int $i, $outputlangs, $hidedetails = 0)

Return line product ref

pdf_getlineref_supplier(Contrat|CommandeFournisseur|FactureFournisseur|Facture|Product|Reception|SupplierProposal $object, int $i, $outputlangs, $hidedetails = 0)

Return line ref_supplier

pdf_getlineremisepercent(SupplierProposal|CommandeFournisseur|Propal|Facture|FactureFournisseur|Commande|StockTransfer $object, int $i, $outputlangs, $hidedetails = 0)

Return line remise percent

pdf_getlinetotalexcltax(Commande|Facture|Propal|FactureFournisseur|CommandeFournisseur|SupplierProposal $object, int $i, $outputlangs, $hidedetails = 0)

Return line total excluding tax

pdf_getlinetotalwithtax(Commande|Facture|Propal|FactureFournisseur|CommandeFournisseur|SupplierProposal $object, int $i, $outputlangs, $hidedetails = 0)

Return line total including tax

pdf_getlineunit(SupplierProposal|CommandeFournisseur|Propal|Facture|FactureFournisseur|Commande|StockTransfer $object, int $i, $outputlangs, $hidedetails = 0)

Return line unit

pdf_getlineupexcltax(CommonObject|SupplierProposal|CommandeFournisseur|Propal|Facture|FactureFournisseur|Commande|StockTransfer $object, int $i, $outputlangs, $hidedetails = 0)

Return line unit price excluding tax

pdf_getlineupwithtax(SupplierProposal|CommandeFournisseur|Propal|Facture|Commande $object, int $i, $outputlangs, $hidedetails = 0)

Return line unit price including tax

pdf_getlinevatrate(SupplierProposal|CommandeFournisseur|FactureFournisseur|Propal|Facture|Commande|ExpenseReport|StockTransfer $object, int $i, $outputlangs, $hidedetails = 0)

Return line vat rate

pdf_pagefoot(TCPDF $pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_basse, $marge_gauche, $page_hauteur, $object, $showdetails = 0, $hidefreetext = 0, $page_largeur = 0, $watermark = '')

Show footer of page for PDF generation

pdf_pagehead($pdf, Translate $outputlangs, $page_height)

Show header of page for PDF generation

void
pdf_render_subtotals(TCPDF $pdf, CommonDocGenerator $generator, float $curY, CommonObject $object, int $i, Translate $outputlangs, int $hideref, int $hidedesc, array $bgColor, bool $isSubtotal = false, bool $applySubtotalLogic = true)

Render subtotals line with a colored background and adapted text color .

pdf_watermark($pdf, Translate $outputlangs, $h, $w, $unit, $text)

Add a draft watermark on PDF files

float
pdf_writeLinkedObjects(TCPDF $pdf, CommonObject $object, Translate $outputlangs, float $posx, float $posy, float $w, float $h, string $align, float $default_font_size)

Show linked objects for PDF generation

pdf_writelinedesc($pdf, CommonObject $object, int $i, $outputlangs, $w, $h, $posx, $posy, $hideref = 0, $hidedesc = 0, $issupplierline = 0, $align = 'J')

Output line description into PDF

php2js(unknown_type $var)

Enter description here .

false|array{0: string, 1: int}
phpSyntaxError(string $code)

Check the syntax of some PHP code.

array<string, array<string, string|array{local: string, master: string}>>
phpinfo_array()

Return the php_info into an array

picto_from_langcode($codelang, string $moreatt = '', $notitlealt = 0)

Return img flag of country for a language code or country code.

string
picto_required()

Return picto saying a field is required

array<array{0: string, 1: string, 2: string}>
positionCardPrepareHead(Position $object)

Prepare array of tabs for positions

ppt($db, $year, $socid)

No description

int
prelevement_check_config(string $type = 'direct-debit')

Check need data to create standigns orders receipt file

array<array{0: string, 1: string, 2: string}>
prelevement_prepare_head(BonPrelevement $object)

Prepare array with list of tabs

price($amount, int<0, 1> $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $forcerounding = -1, $currency_code = '')

Function to format a value into an amount for visual output Function used into PDF and HTML pages

string
price2fec($amount)

Function to format a value into a defined format for French administration (no thousand separator & decimal separator force to ',' with two decimals) Function used into accountancy FEC export

string
price2num(int|float|string|null $amount, ""|"MU"|"MT"|"MS"|"CU"|"CT"|int<0, max> $rounding = '', $option = 0)

Function that return a number with universal decimal format (decimal separator is '.') from an amount typed by a user.

string
printBookmarksList(DoliDb $aDb, Translate $aLangs)

Add area with bookmarks in menu

printBoxesArea($user, $areacode)

\brief Show a HTML Tab with boxes of a particular area including personalized choices of user \param user User \param areacode Code of area for pages (0=value for Home page) \return int <0 if KO, Nb of boxes shown of OK (0 to n)

void
printCodeForPing(string $constanttosavelastko, string $constanttosavefirstok, array<string, string> $arrayofdata = array(), int $forceping = 0)

Function to output HTML to make an ajax call to make registration

void
printCommonFooter(string $zone = 'private')

Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global->MAIN_GOOGLE_AN_ID js for conf->global->MAIN_SHOW_TUNING_INFO or $_SERVER["MAIN_SHOW_TUNING_INFO"] js for conf->logbuffer

string
printDropdownBookmarksList()

Add area with bookmarks in top menu

string
printDropdownQuickadd(int $mode = 0)

Generate list of quickadd items

printSearchForm(string $urlaction, $urlobject, $title, $htmlmorecss, $htmlinputname, $accesskey = '', $prefhtmlinputname = '', $img = '', $showtitlebefore = 0, $autofocus = 0)

Show a search area.

void
printTotalValCell(string $type, string $val)

print a total cell value according to its type

void
print_actions_filter(Form $form, int $canedit, string $status, int $year, int $month, int $day, int $showbirthday, string $filtera, string $filtert, string $filtered, int $pid, int $socid, string $action, array<array{type: string, sr: string, name: string, offsettz: int, color: string, default: string, buggedfile: string}>|int<-1, -1> $showextcals = array(), string|string[] $actioncode = '', int|int[] $usergroupid = 0, ""|"systemauto"|"system" $excludetype = '', int $resourceid = 0, int $search_categ_cus = 0)

Show filter form in agenda view

int
print_auguria_menu(DoliDB $db, string $atarget, int $type_user, array<array{rowid: string, fk_menu: string, langs: string, enabled: int<0, 2>, type: string, fk_mainmenu: string, fk_leftmenu: string, url: string, titre: string, perms: string, target: string, mainmenu: string, leftmenu: string, position: int, positionfull: int|string, showtopmenuinframe: int, level: int, prefix: string}> $tabMenu, Menu $menu, int<0, 1> $noout = 0, string $mode = '')

Core function to output top menu auguria

void
print_barre_liste(string $title, int|null $page, string $file, string $options = '', ?string $sortfield = '', ?string $sortorder = '', string $morehtmlcenter = '', int $num = -1, int|string $totalnboflines = '', string $picto = 'generic', int $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limit = -1, $selectlimitsuffix = 0, $hidenavigation = 0, $pagenavastextinput = 0, $morehtmlrightbeforearrow = '')

Print a title with navigation controls for pagination

print_date_range($date_start, int $date_end, $format = '', $outputlangs = null)

Format output for start and end date

int
print_eldy_menu(DoliDB $db, string $atarget, int $type_user, array<array{rowid: string, fk_menu: string, langs: string, enabled: int<0, 2>, type: string, fk_mainmenu: string, fk_leftmenu: string, url: string, titre: string, perms: string, target: string, mainmenu: string, leftmenu: string, position: int, positionfull: int|string, showtopmenuinframe: int, level?: int, prefix: string}> $tabMenu, Menu $menu, int $noout = 0, string $mode = '')

Core function to output the top menu eldy

void
print_end_menu_array()

Output menu array

void
print_end_menu_array_auguria()

Output menu array

void
print_end_menu_array_empty()

Output menu array

void
print_end_menu_entry(int $showmode)

Output end menu entry

void
print_end_menu_entry_auguria(int $showmode)

Output end menu entry

void
print_end_menu_entry_empty(int $showmode)

Output end menu entry

print_fiche_titre(string $title, string $mesg = '', string $picto = 'generic', int $pictoisfullpath = 0, $id = '')

Show a title with picto

void
print_fleche_navigation(int $page, string $file, string $options = '', int $nextpage = 0, string $betweenarrows = '', $afterarrows = '', $limit = -1, int $totalnboflines = 0, $selectlimitsuffix = '', $beforearrows = '', $hidenavigation = 0)

Function to show navigation arrows into lists

int
print_left_auguria_menu(DoliDB $db, array<array{rowid: string, fk_menu: string, langs: string, enabled: int<0, 2>, type: string, fk_mainmenu: string, fk_leftmenu: string, url: string, titre: string, perms: string, target: string, mainmenu: string, leftmenu: string, position: int, positionfull: int|string, showtopmenuinframe: int, level: int, prefix: string}> $menu_array_before, array<array{rowid: string, fk_menu: string, langs: string, enabled: int<0, 2>, type: string, fk_mainmenu: string, fk_leftmenu: string, url: string, titre: string, perms: string, target: string, mainmenu: string, leftmenu: string, position: int, positionfull: int|string, showtopmenuinframe: int, level: int, prefix: string}> $menu_array_after, array<array{rowid: string, fk_menu: string, langs: string, enabled: int<0, 2>, type: string, fk_mainmenu: string, fk_leftmenu: string, url: string, titre: string, perms: string, target: string, mainmenu: string, leftmenu: string, position: int, positionfull: int|string, showtopmenuinframe: int, level: int, prefix: string}> $tabMenu, Menu $menu, int<0, 1> $noout = 0, string $forcemainmenu = '', string $forceleftmenu = '', ?array<string, string> $moredata = null, int<0, 1> $type_user = 0)

Core function to output left menu auguria Fill &$menu (example with $forcemainmenu='home' $forceleftmenu='all', return left menu tree of Home)

int<0, max>
print_left_eldy_menu(DoliDB $db, array<array{rowid: string, fk_menu: string, module?: string, langs: string, enabled: int<0, 2>, type: string, fk_mainmenu: string, fk_leftmenu: string, url: string, titre: string, perms: string, target: string, mainmenu: string, leftmenu: string, position: int, positionfull: int|string, showtopmenuinframe: int, level?: int, prefix: string}> $menu_array_before, array<array{rowid: string, fk_menu: string, module?: string, langs: string, enabled: int<0, 2>, type: string, fk_mainmenu: string, fk_leftmenu: string, url: string, titre: string, perms: string, target: string, mainmenu: string, leftmenu: string, position: int, positionfull: int|string, showtopmenuinframe: int, level?: int, prefix: string}> $menu_array_after, array<array{rowid: string, fk_menu: string, module?: string, langs: string, enabled: int<0, 2>, type: string, fk_mainmenu: string, fk_leftmenu: string, url: string, titre: string, perms: string, target: string, mainmenu: string, leftmenu: string, position: int, positionfull: int|string, showtopmenuinframe: int, level?: int, prefix: string}> $tabMenu, Menu $menu, int<0, 1> $noout = 0, string $forcemainmenu = '', string $forceleftmenu = '', ?array{searchform?: string, bookmarks?: string} $moredata = null, int<0, 1> $type_user = 0)

Core function to output left menu eldy Fill &$menu (example with $forcemainmenu='home' $forceleftmenu='all', return left menu tree of Home)

void
print_liste_field_titre(?string $name, string $file = "", string $field = "", string $begin = "", string $param = "", string $moreattrib = "", ?string $sortfield = "", ?string $sortorder = "", $prefix = "", $tooltip = "", $forcenowrapcolumntitle = 0)

Show title line of an array

int
print_paybox_redirect(float $PRICE, string $CURRENCY, string $EMAIL, string $urlok, string $urlko, string $TAG)

Create a redirect form to paybox form

string
print_paypal_redirect(float $paymentAmount, string $currencyCodeType, string $paymentType, string $returnURL, string $cancelURL, string $tag)

Send redirect to paypal to browser

void
print_projecttasks_array(DoliDB $db, Form $form, int $socid, int|string $projectsListId, int<0, 1> $mytasks = 0, int<-1, 1> $status = -1, array<int, string> $listofoppstatus = array(), string[] $hiddenfields = array(), int<0, max> $max = 0)

Return HTML table with list of projects and number of opened tasks

void
print_start_menu_array()

Output start menu array

void
print_start_menu_array_auguria()

Output start menu array

void
print_start_menu_array_empty()

Output menu entry

void
print_start_menu_entry(string $idsel, string $classname, int $showmode)

Output start menu entry

void
print_start_menu_entry_auguria(string $idsel, string $classname, int $showmode)

Output start menu entry

void
print_start_menu_entry_empty(string $idsel, string $classname, int $showmode)

Output start menu entry

void
print_text_menu_entry(string $text, int $showmode, string $url, string $id, string $idsel, string $classname, string $atarget, array{}|array{rowid: string, fk_menu: string, langs: string, enabled: int<0, 2>, type: string, fk_mainmenu: string, fk_leftmenu: string, url: string, titre: string, perms: string, target: string, mainmenu: string, leftmenu: string, position: int, positionfull: int|string, showtopmenuinframe: int, level?: int, prefix: string} $menuval = array())

Output menu entry

void
print_text_menu_entry_auguria(string $text, int<0, 2> $showmode, string $url, string $id, string $idsel, string $classname, string $atarget, array{rowid: string, fk_menu: string, langs: string, enabled: int<0, 2>, type: string, fk_mainmenu: string, fk_leftmenu: string, url: string, titre: string, perms: string, target: string, mainmenu: string, leftmenu: string, position: int, positionfull: int|string, showtopmenuinframe: int, level: int, prefix: string}|array{} $menuval = array())

Output menu entry

void
print_text_menu_entry_empty(string $text, int $showmode, string $url, string $id, string $idsel, string $classname, string $atarget, array{}|array{rowid: string, fk_menu: string, langs: string, enabled: int<0, 2>, type: string, fk_mainmenu: string, fk_leftmenu: string, url: string, titre: string, perms: string, target: string, mainmenu: string, leftmenu: string, position: int, positionfull: int|string, showtopmenuinframe: int, level?: int, prefix: string} $menuval = array())

Output menu entry

print_titre(string $title)

Show a title.

array<array{0: string, 1: string, 2: string}>
printingAdminPrepareHead($mode)

Define head array for tabs of printing tools setup pages

array
printingadmin_prepare_head($mode)

Define head array for tabs of printing tools setup pages

array<array{0: string, 1: string, 2: string}>
productAttributePrepareHead(ProductAttribute $object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
product_admin_prepare_head()

Return array head with list of tabs to view object information.

array<array{0: string, 1: string, 2: string}>
product_lot_admin_prepare_head()

Return array head with list of tabs to view object information.

array<array{0: string, 1: string, 2: string}>
product_prepare_head(Product $object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
productlot_prepare_head(ProductLot $object)

Prepare array with list of tabs

array<int, int>
projectLinesPerAction(int $inc, int $parent, User $fuser, Task[] $lines, int $level, array<int, string> $projectsrole, array<int, string> $tasksrole, string $mine, int<0, 1> $restricteditformytask, int $preselectedday, array<int, array{morning: int<0, 1>, afternoon: int<0, 1>}> $isavailable, int $oldprojectforbreak = 0)

Output a task line into a pertime input mode

array<int, int>
projectLinesPerDay(int $inc, int $parent, User $fuser, Task[] $lines, int $level, array<int, string> $projectsrole, array<int, string> $tasksrole, int<0, 1> $mine, int<0, 2> $restricteditformytask, int $preselectedday, array<int, array{morning: int<0, 1>, afternoon: int<0, 1>}> $isavailable, int $oldprojectforbreak = 0, array<string, array<string, int|string>> $arrayfields = array(), Extrafields $extrafields = null)

Output a task line into a pertime input mode

array<string, int>
projectLinesPerMonth(int $inc, int $firstdaytoshow, User|null $fuser, int $parent, Task[] $lines, int $level, array<int, string> $projectsrole, array<int, string> $tasksrole, int<0, 1> $mine, int<0, 1> $restricteditformytask, array<int, array{morning: int<0, 1>, afternoon: int<0, 1>}> $isavailable, int $oldprojectforbreak = 0, string[] $TWeek = array(), array<string, array<string, int|string>> $arrayfields = array(), Extrafields $extrafields = null)

Output a task line into a perday input mode

array<int, int>
projectLinesPerWeek(int $inc, int $firstdaytoshow, User $fuser, int $parent, Task[] $lines, int $level, array<int, string> $projectsrole, array<int, string> $tasksrole, int<0, 1> $mine, int<0, 2> $restricteditformytask, array<int, array{morning: int<0, 1>, afternoon: int<0, 1>}> $isavailable, int $oldprojectforbreak = 0, array<string, array<string, int|string>> $arrayfields = array(), Extrafields $extrafields = null)

Output a task line into a perday input mode

int
projectLinesa(int $inc, int $parent, Task[] $lines, int $level, string $var, int $showproject, array<int, string> $taskrole, string $projectsListId = '', int $addordertick = 0, int $projectidfortotallink = 0, string $dummy = '', int $showbilltime = 0, array<string, array<string, int|string>> $arrayfields = array(), string[] $arrayofselected = array())

Show task lines with a particular parent

array<array{0: string, 1: string, 2: string}>
project_admin_prepare_head()

Prepare array with list of tabs

project_pdf_create(DoliDB $db, Project $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
deprecated

Create an intervention document on disk using template defined into PROJECT_ADDON_PDF

array<array{0: string, 1: string, 2: string}>
project_prepare_head(Project $project, string $moreparam = '')

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
project_timesheet_prepare_head(string $mode, User|string $fuser = null)

Prepare array with list of tabs

propal_admin_prepare_head()

Return array head with list of tabs to view object information.

array<array{0: string, 1: string, 2: string}>
propal_prepare_head(Propal $object)

Prepare array with list of tabs

propale_pdf_create(DoliDB $db, Propal $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
deprecated

Create a document onto disk according to template module.

propals($db, $year, $month)

No description

void
pt(DoliDB $db, string $sql, string $date)

print function

int
purgeSessions($mysessionid)

Purge existing sessions

string
quotedPrintDecode($str)

Decode vcal format

quotedPrintEncode($str, int $forcal = 0)

Encode into vcal format

rand_chaine($taille)

No description

string
randomColor(int $min = 0, int $max = 255)

Return hexadecimal color randomly

string
randomColorPart(int $min = 0, int $max = 255)

Return 2 hexa code randomly

string
rate(stdClass> $TMergedSkills, string $field)

Return a html list with rank information

bool
rcopy(string $src, string $dst)

recursive copy files & dirs

int<-1, 1>
reWriteAllMenus(string $file, array<int, array{commentgroup?: string, fk_menu: string, type: string, titre: string, mainmenu: string, leftmenu: string, url: string, langs: string, position: int|string, enabled: int|string, perms: string, target: string, user: int}> $menus, null|string|array{commentgroup?: string, fk_menu: string, type: string, titre: string, mainmenu: string, leftmenu: string, url: string, langs: string, position: int|string, enabled: int|string, perms: string, target: string, user: int} $menuWantTo, ?int $key, int<-1, 2> $action)

No description

int<-1, 1>
reWriteAllPermissions(string $file, array<int, string[]> $permissions, ?int $key, ?array{0: string, 1: string} $right, string $objectname, string $module, int<-2, 2> $action)

Rewriting all permissions after any actions

readfileLowMemory(string $fullpath_original_file_osencoded, $method = -1)

Return a file on output using a low memory. It can return very large files with no need of memory.

string
realCharForNumericEntities(array<int, string> $matches)

Return the real char for a numeric entities.

rebuildObjectClass($destdir, string $module, $objectname, $newmask, $readdir = '', $addfieldentry = array(), $delfieldentry = '')

Regenerate files .class.php

rebuildObjectSql($destdir, string $module, $objectname, $newmask, $readdir = '', $object = null, $moduletype = 'external')

Save data into a memory area shared by all users, all sessions on server

int
rebuild_merge_pdf(DoliDB $db, Translate $langs, Conf $conf, string $diroutputpdf, string $newlangid, string[] $filter, int $dateafterdate, int $datebeforedate, int $paymentdateafter, int $paymentdatebefore, int $usestdout, string $regenerate = '', string $filesuffix = '', string $paymentbankid = '', int[] $thirdpartiesid = [], string $fileprefix = 'mergedpdf', int $donotmerge = 0, string $mode = 'invoice')

Function to build a compiled PDF

array<array{0: string, 1: string, 2: string}>
receiptprinteradmin_prepare_head($mode)

Define head array for tabs of receipt printer setup pages

reception_admin_prepare_head()

Return array head with list of tabs to view object information.

array<array{0: string, 1: string, 2: string}>
reception_prepare_head(Reception $object)

Prepare array with list of tabs

void
recordNotFound(string $message = '', int<0, 1> $printheader = 1, int<0, 1> $printfooter = 1, int<0, 1> $showonlymessage = 0, mixed $params = null)

Displays an error page when a record is not found. It allows customization of the message, whether to include the header and footer, and if only the message should be shown without additional details.

array<array{0: string, 1: string, 2: string}>
recruitmentAdminPrepareHead()

Prepare admin pages header

array<array{0: string, 1: string, 2: string}>
recruitmentCandidaturePrepareHead(RecruitmentCandidature $object)

Prepare array of tabs for RecruitmentCandidature

array<array{0: string, 1: string, 2: string}>
recruitmentjobpositionPrepareHead(RecruitmentJobPosition $object)

Prepare array of tabs for RecruitmentJobPosition

void
redirectToContainer(string $containerref, string $containeraliasalt = '', int $containerid = 0, int<0, 1> $permanent = 0, array<string, mixed> $parameters = array(), int<0, 1> $parampropagation = 1)

Make a redirect to another container.

string
removeEmoji(string $text, int<0, 2> $allowedemoji = 1)

Remove EMoji from email content

string
removeGlobalParenthesis(string $string)

Remove first and last parenthesis but only if first is the opening and last the closing of the same group

string
removeHtmlComment(string $content)

Function to remove comments into HTML content

int<-1, 1>
removeObjectFromApiFile(string $file, string[] $objects, string $objectname)

Remove Object variables and methods from API_Module File

void
report_header(string $reportname, string $notused, string $period, string $periodlink, string $description, int $builddate, string $exportlink = '', array<string, mixed> $moreparam = array(), string $calcmode = '', $varlink = '')

Show header of a report

array<array{0: string, 1: string, 2: string}>
resource_admin_prepare_head()

Prepare head for admin tabs

array<array{0: string, 1: string, 2: string}>
resource_prepare_head(Dolresource $object)

Prepare head for tabs

restrictedArea(User $user, string $features, int|string|object $object = 0, string $tableandshare = '', string $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid', $isdraft = 0, $mode = 0)

Check permissions of a user to show a page and an object. Check read permission.

int
revcompare(array $x, array $y)

Compare revisions

int
roundUpToNextMultiple(float $n, int $x = 5)

Round to next multiple.

string
rss_map_attrs(string $k, string $v)

Function to convert an XML object into an array

run_sql(string $sqlfile, $silent = 1, $entity = 0, int $usesavepoint = 1, string $handler = '', string $okerror = 'default', $linelengthlimit = 32768, $nocommentremoval = 0, $offsetforchartofaccount = 0, $colspan = 0, $onlysqltoimportwebsite = 0, $database = '')

Launch a sql file. Function is used by:

  • Migrate process (dolibarr-xyz-abc.sql)
  • Loading sql menus (auguria)
  • Running specific Sql by a module init
  • Loading sql file of website import package Install process however does not use it.

array<array{0: string, 1: string, 2: string}>
salaries_admin_prepare_head()

Return array head with list of tabs to view object information

array<array{0: string, 1: string, 2: string}>
salaries_prepare_head(Salary $object)

Returns an array with the tabs for the "salaries" section It loads tabs from modules looking for the entity salaries

sanitizeVal($out = '', string $check = 'alphanohtml', $filter = null, $options = null)

Return a sanitized or empty value after checking value against a rule.

string|-1
saveAttachment(string $path, string $filename, mixed $data)

Save the attached file into a directory with a given name

int
searchTaskInChild(int $inc, int $parent, Task[] $lines, array<int, string> $taskrole)

Search in task lines with a particular parent if there is a task for a particular user (in taskrole)

array<array{0: string, 1: string, 2: string}>
security_prepare_head()

Prepare array with list of tabs

select_expensereport_statut(int $selected = '', $htmlname = 'fk_statut', $useempty = 1, $useshortlabel = 0)

Retourne la liste deroulante des differents etats d'une note de frais.

select_projects($socid = -1, $selected = '', $htmlname = 'projectid')

\brief Show a combo list with projects qualified for a third party \param socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id) \param selected Id project preselected \param htmlname Nom de la zone html \return int Nbre of project if OK, <0 if KO

select_type_fees_id($selected = '', string $htmlname = 'type', $showempty = 0, $active = 1)

Return list of types of notes with select value = id

sendMail(int $id, int $cancreate, int $now, int $autoValidation)

send email to validator for current leave represented by (id)

int
setEntity($currentobject)

Set entity id to use when to create an object

setEventMessage(string|string[] $mesgs, $style = 'mesgs', $noduplicate = 0, $attop = 0)

Set event message in dol_events session object. Will be output by calling dol_htmloutput_events.

setEventMessages(string|null $mesg, string[]|null $mesgs, $style = 'mesgs', $messagekey = '', $noduplicate = 0, $attop = 0)

Set event messages in dol_events session object. Will be output by calling dol_htmloutput_events.

mixed
setUserPassword(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{login: string, password: string} $shortuser)

Set password of an user

array<array{0: string, 1: string, 2: string}>
shipping_prepare_head(Expedition $object)

Prepare array with list of tabs

showArrayOfBookmark($fac)

\file htdocs/lib/bookmark.lib.php \brief List of functions for bookmark module \version $Id$

string
showDimensionInBestUnit(float $dimension, int $unit, string $type, Translate $outputlangs, int<-1, max> $round = -1, string $forceunitoutput = 'no', int<0, 1> $use_short_label = 0)

Output a dimension with best unit

string
showEyeForField(string $htmlname, string $htmlnameofinput)

Output the eye picto to show/hide a password HTML field.

string
showModulesExludedForExternal(DolibarrModules[] $modules)

Show array with constants to edit

string
showMyBalance(Holiday $holiday, int $user_id)

Show balance of user

string
showOnlinePaymentUrl(string $type, string $ref, int|float $amount = 0)

Return string with full online payment Url

string
showOnlineSignatureUrl(string $type, string $ref, CommonObject $obj = null, string $mode = '')

Return string with full online Url to accept and sign a quote

string
showPaypalPaymentUrl(string $type, string $ref)

Return string with full Url

showSkins($fuser, int $edit = 0, $foruserprofile = false)

Show list of themes. Show all thumbs of themes

string
showStripePaymentUrl(string $type, string $ref)

Return string with full Url

string
showValueWithClipboardCPButton(string $valuetocopy, int<0, 1> $showonlyonhover = 1, string $texttoshow = '')

Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).

showWeather($totallate, string $text, $options, $morecss = '')

Show weather logo. Logo to show depends on $totallate and values for conf 'MAIN_METEO_LEVELx'

showWebsiteTemplates(Website $website, int $refresh)

Show list of themes. Show all thumbs of themes/skins

show_actions_done(Conf $conf, $langs, $db, $filterobj, $objcon = null, $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC', $module = '')

Show html area with actions (done or not, ignore the name of function).

?string
show_actions_messaging(Conf $conf, Translate $langs, DoliDB $db, CommonObject $filterobj, Contact $objcon = null, int $noprint = 0, string $actioncode = '', string $donetodo = 'done', array<string, string> $filters = array(), string $sortfield = 'a.datep,a.id', string $sortorder = 'DESC')

Show html area with actions in messaging format.

show_actions_todo($conf, Translate $langs, $db, $filterobj, $objcon = null, $noprint = 0, $actioncode = '')

Show html area with actions to do

show_addresses($conf, Translate $langs, $db, $object, $backtopage = '')

Show html area for list of addresses

void
show_array_actions_to_do($max = 5)

Show actions to do array

void
show_array_last_actions_done($max = 5)

Show last actions array

void
show_bookcal_day_events(int $day, int $month, int $year, int $today = 0)

Show event of a particular day

show_contacts($conf, Translate $langs, $db, $object, $backtopage = '', $showuserlogin = 0)

Show html area for list of contacts

show_contacts_projects($conf, Translate $langs, $db, $object, $backtopage = '', $nocreatelink = 0, $morehtmlright = '')

Show html area for list of projects

void
show_day_events(DoliDB $db, int $day, int $month, int $year, int $monthshown, string $style, ActionComm[]> $eventarray, int $maxprint = 0, int $maxnbofchar = 16, string $newparam = '', int $showinfo = 0, int $minheight = 60, int<-1, 1> $nonew = 0, array{}|array{help: "toreporttype", 0: array{0: int, 1: int, 2: int}, 1: array{0: int, 1: int, 2: int}, 2: array{0: int, 1: int, 2: int}} $bookcalcalendarsarray = array())

Show event of a particular day

void
show_day_events2(User $username, int $day, int $month, int $year, int $monthshown, string $style, ActionComm[]> $eventarray, int $maxprint = 0, int $maxnbofchar = 16, string $newparam = '', int $showinfo = 0, int $minheight = 60, bool $showheader = false, array<string, string> $colorsbytype = array(), bool $var = false)

Show event line of a particular day for a user

void
show_day_events_pertype(string $username, int $day, int $month, int $year, int $monthshown, string $style, ActionComm[]> $eventarray, int $maxprint = 0, int $maxnbofchar = 16, string $newparam = '', int $showinfo = 0, int $minheight = 60, bool $showheader = false, array<string, string> $colorsbytype = array(), bool $var = false)

Show event line of a particular day for a user

void
show_elem(array<int|string, array{label?: string, example1?: string, required?: bool, imported?: bool|int<0, 1>, position?: int}> $fieldssource, int $pos, string $key)

Function to put the movable box of a source field

int
show_ldap_content(array<"count"|int|string, int|string|mixed[]> $result, int $level, int $count, bool $var, int<0, 1> $hide = 0, int $subcount = 0)

Show a LDAP array into an HTML output array.

show_ldap_test_button($butlabel, string $testlabel, $key, $dn, $objectclass)

Show button test LDAP synchro

int
show_list_sending_receive(string $origin, int $origin_id, string $filter = '')

List sendings and receive receipts

show_projects($conf, Translate $langs, $db, $object, $backtopage = '', $nocreatelink = 0, $morehtmlright = '', $massactionbutton = '')

Show html area for list of projects

show_skin($fuser, int $edit = 0)

Show list of ckeditor's themes.

int
show_stats_for_batch(Productlot $batch, int $socid)

Show stats for product batch

int
show_stats_for_company(Product $product, int $socid)

Show stats for a product

show_subsidiaries($conf, Translate $langs, $db, $object)

Show html area for list of subsidiaries

show_theme($fuser, int $edit = 0, $foruserprofile = false)

Show list of themes. Show all thumbs of themes

show_ticket_messaging(Conf $conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC')

Show html area with actions for ticket messaging.

string
skillList(stdClass> $TMergedSkills)

return a html ul list of skills

array<array{0: string, 1: string, 2: string}>
skillPrepareHead(Skill $object)

Prepare array of tabs for Skill

array<array{0: string, 1: string, 2: string}>
skilldetPrepareHead(Skilldet $object)

Prepare array of tabs for Skilldet

array<array{0: string, 1: string, 2: string}>
skillrankPrepareHead(SkillRank $object)

Prepare array of tabs for SkillRank

array<array{0: string, 1: string, 2: string}>
socialnetwork_prepare_head()

Function for return different onglet of socialnetworks admin page

array<array{0: string, 1: string, 2: string}>
societe_admin_prepare_head()

Return array head with list of tabs to view object information.

array<array{0: string, 1: string, 2: string}>
societe_prepare_head(Societe $object)

Return array of tabs to used on pages for third parties cards.

array<array{0: string, 1: string, 2: string}>
societe_prepare_head2(object $object)

Return array of tabs to used on page

array<int, string>
sortElementsByClientName(array<int, string> $elementarray)

sortElementsByClientName

int
sort_events_by_date(object $a, object $b)

Sort events by date

int
sort_events_by_percentage(object $a, object $b)

Sort events by percentage

void
startSimpleTable(string $header, string $link = "", string $arguments = "", int $emptyColumns = 0, int $number = -1, string $pictofulllist = '')

Start a table with headers and a optional clickable number (don't forget to use "finishSimpleTable()" after the last table row)

bool
startsWith(string $haystack, string $needle)

Verify if $haystack startswith $needle

array<array{0: string, 1: string, 2: string}>
stock_admin_prepare_head()

Return array head with list of tabs to view object information.

array<array{0: string, 1: string, 2: string}>
stock_prepare_head(Entrepot $object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
stocktransferAdminPrepareHead()

Prepare admin pages header

array<array{0: string, 1: string, 2: string}>
stocktransferPrepareHead(StockTransfer $object)

Prepare array of tabs for StockTransfer

bool
str_contains(string $haystack, string $needle)

str_contains

bool
str_ends_with(string $haystack, string $needle)

str_ends_with

bool
str_starts_with(string $haystack, string $needle)

str_starts_with

array<array{0: string, 1: string, 2: string}>
stripeadmin_prepare_head()

Define head array for tabs of stripe tools setup pages

stripslashes_deep($value)

No description

array<int, array<int, string>>
subscription_prepare_head(Subscription $object)

Return array head with list of tabs to view object information

subtotals_completesubstitutionarray_lines($substitutionarray, Translate $langs, $object, $line)

Function called to complete substitution array (before generating on ODT, or a personalized email) functions xxx_completesubstitutionarray are called by make_substitutions() if file is inside directory htdocs/core/substitutions

sumAmountsForUnalterableEvent($block, array<string, int> $refinvoicefound, $totalhtamount, $totalvatamount, $totalamount, $total_ht, $total_vat, $total_ttc)

sumAmountsForUnalterableEvent

supplier_invoice_pdf_create(DoliDB $db, object $object, string $modele, Translate $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)

Create a document onto disk according to template model.

array<array{0: string, 1: string, 2: string}>
supplier_invoice_rec_prepare_head(Facture|FactureFournisseurRec $object)

Return array head with list of tabs to view object information.

supplier_order_pdf_create(DoliDB $db, CommandeFournisseur $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
deprecated

Create a document onto disk according to template model.

supplier_proposal_admin_prepare_head()

Return array head with list of tabs to view object information.

supplier_proposal_pdf_create(DoliDB $db, SupplierProposal $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
deprecated

Create a document onto disk according to template module.

array<array{0: string, 1: string, 2: string}>
supplier_proposal_prepare_head(SupplierProposal $object)

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
supplierorder_admin_prepare_head()

Return array head with list of tabs to view object information.

suppr_accents($chaine)

No description

array
takeposAdminPrepareHead()

Prepare admin pages header

array<array{0: string, 1: string, 2: string}>
takepos_admin_prepare_head()

Prepare array with list of tabs

array
takepos_prepare_head()

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
targetPrepareHead(Target $object)

Prepare array of tabs for Target

task_pdf_create(DoliDB $db, Task $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $hookmanager = false)
deprecated

Create an intervention document on disk using template defined into PROJECT_TASK_ADDON_PDF

array<array{0: string, 1: string, 2: string}>
task_prepare_head(CommonObject $object)

Prepare array with list of tabs

tax_by_date($type, DoliDB $db, $y, $q, $date_start, $date_end, $modetax, $direction, $m = 0)

Gets Tax to collect for the given year (and given quarter or month) The function gets the Tax in split results, as the Tax declaration asks to report the amounts for different Tax rates as different lines.

tax_by_rate($type, DoliDB $db, $y, $q, $date_start, $date_end, $modetax, $direction, $m = 0)

Gets Tax to collect for the given year (and given quarter or month) The function gets the Tax in split results, as the Tax declaration asks to report the amounts for different Tax rates as different lines.

tax_by_thirdparty($type, DoliDB $db, $y, $date_start, $date_end, $modetax, $direction, $m = 0, $q = 0)

Look for collectable VAT clients in the chosen year (and month)

array<array{0: string, 1: string, 2: string}>
tax_prepare_head(ChargeSociales $object)

Prepare array with list of tabs

int
testSqlAndScriptInject(string $val, int<0, 3> $type)

Security: WAF layer for SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, SERVER['PHP_SELF']).

int
test_sql_and_script_inject(string $val, string $type)

Security: SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF).

thirdparty_doc_create(DoliDB $db, Societe $object, $message, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)

Create a document onto disk according to template module.

array<array{0: string, 1: string, 2: string}>
ticketAdminPrepareHead()

Build tabs for admin page

array<array{0: string, 1: string, 2: string}>
ticket_prepare_head($object)

Build tabs for a Ticket object

void
top_htmlhead(string $head, string $title = '', int<0, 2> $disablejs = 0, int<0, 1> $disablehead = 0, string[] $arrayofjs = array(), string[] $arrayofcss = array(), int<0, 1> $disableforlogin = 0, int<0, 1> $disablenofollow = 0, int<0, 1> $disablenoindex = 0)

Output html header of a page. It calls also top_httphead() This code is also duplicated into security2.lib.php::dol_loginfunction

top_httphead($contenttype = 'text/html', int<0, 1> $forcenocache = 0)

Show HTTP header. Called by top_htmlhead().

top_menu($head, string $title = '', $target = '', int<0, 1> $disablejs = 0, int<0, 1> $disablehead = 0, string[] $arrayofjs = array(), string[] $arrayofcss = array(), $morequerystring = '', $helppagename = '')

Show an HTML header + a BODY + The top menu bar

string
top_menu_bookmark()

Build the tooltip on top menu bookmark

string
top_menu_importfile()

Build the tooltip on top menu quick add.

string
top_menu_quickadd()

Build the tooltip on top menu quick add.

string
top_menu_user(int<0, 1> $hideloginname = 0, string $urllogout = '')

Build the tooltip on user login

array<array{0: string, 1: string, 2: string}>
translation_prepare_head()

Prepare array with list of tabs

void
treeOutputForAbsoluteDir(array<int, array{id: int, id_mere: int, fulllabel: string, fullpath: string, fullrelativename: string, label: string, description: string, cachenbofdoc: int, date_c: int, fk_user_c: int, statut_c: int, login_c: string, id_children?: int[], level: int}> $sqltree, string $selecteddir, string $fullpathselecteddir, string $modulepart, string $websitekey, int $pageid, string $preopened, string $fullpathpreopened, int $depth = 0)

treeOutputForAbsoluteDir

tree_addjs()

\brief Ad javascript tree functions

tree_recur(array<array{rowid: int, module?: string, fk_menu?: int, title?: string, mainmenu?: string, leftmenu?: string, fk_mainmenu?: string, fk_leftmenu?: string, statut?: int, entry?: string, buttons?: string}> $tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoresetalreadyloaded = 0, $showfk = 0, $moreparam = '')

Recursive function to output a tree.

  • ...
It is also used for the tree of categories.

tree_showline($tab, $rang)

No description

array{0: int, 1: int, 2: int}
tree_showpad(array<int, array{rowid: int, id: int, fk_parent: int, label: string, description: string, color: string, position: string, visible: int, ref_ext: string, picto: string, fullpath: string, fulllabel: string, level: int, cachenbofdoc?: int}> $fulltree, int $key, int<0, 1> $silent = 0)

Show indent and picto of a tree line. Return array with information of line.

array<array{string, string, string}>
triggerhistoryPrepareHead(TriggerHistory $object)

Prepare array of tabs for

array<array{0: string, 1: string, 2: string}>
trip_prepare_head(Deplacement $object)

Prepare array with list of tabs

array
tva_coll(DoliDB $db, int $y, int $q)

Gets VAT to collect for the given month of the given year The function gets the VAT in split results, as the VAT declaration asks to report the amounts for different VAT rates as different lines.

array
tva_paye(DoliDB $db, int $y, int $q)

Gets VAT to pay for the given month of the given year The function gets the VAT in split results, as the VAT declaration asks to report the amounts for different VAT rates as different lines

unActivateModule($value, int $requiredby = 1, $options = '')

Disable a module

array{result: array{result_code: string, result_label: string}}
updateActionComm(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: string, ref: string, ref_ext: string, type_id: string, type_code: string, type: string, label: string, datep: int, datef: int, datec: int, datem: int, note: string, percentage: string, author: string, usermod: string, userownerid: string, priority: string, fulldayevent: string, location: string, socid: string, contactid: string, projectid: string, fk_element: string, elementtype: string} $actioncomm)

Create ActionComm

array{result: array{result_code: string, result_label: string}}
updateContact(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: string, ref_ext: string, lastname: string, firstname: string, address: string, zip: string, town: string, state_id: string, state_code: string, state: string, country_id: string, country_code: string, country: string, socid: string, status: string, phone_pro: string, fax: string, phone_perso: string, phone_mobile: string, code: string, email: string, birthday: string, default_lang: string, note: string, ref_facturation: string, ref_contrat: string, ref_commande: string, ref_propal: string, user_id: string, user_login: string, civility_id: string, poste: string} $contact)

Update a contact

int
updateDictionaryInFile(string $module, string $file, array{langs: string, tabname: string[], tablib: string[], tabsql: string[], tabsqlsort: string[], tabfield: string[], tabfieldvalue: string[], tabfieldinsert: string[], tabrowid: string[], tabcond: array<string|bool|int>, tabhelp: array<array{code: string, field2: string}>} $dicts)

Updates a dictionary in a module descriptor file.

array{result: array{result_code: string, result_label: string}, id?: int, ref?: string, ref_ext?: string}
updateInvoice(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: string, ref: string, ref_ext: string, status?: string, close_code?: int, close_note?: int} $invoice)

Update an invoice, only change the state of an invoice

array{result: array{result_code: string, result_label: string}}
updateOrder(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: string, ref: string, refext: string} $order)

Update an order

array{result: array{result_code: string, result_label: string}}
updateProductOrService(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: string, ref: string, ref_ext: string, type: string, label: string, description: string, date_creation: string, date_modification: string, note: string, status_tobuy: string, status_tosell: string, barcode: string, barcode_type: string, country_id: string, country_code: string, customcode: string, price_net: string, price: string, price_min_net: string, price_min: string, price_base_type: string, vat_rate: string, vat_npr: string, localtax1_tx: string, localtax2_tx: string, stock_alert: string, stock_real: string, stock_pmp: string, warehouse_ref: string, canvas: string, import_key: string, dir: string, images: array<array{photo: string, photo_vignette: string, imgWidth: string, imgHeight: string}>} $product)

Update a product or service

array{result: array{result_code: string, result_label: string}}
updateThirdParty(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, array{id: string, ref: string, ref_ext: string, fk_user_author: string, status: string, client: string, supplier: string, customer_code: string, supplier_code: string, customer_code_accountancy: string, supplier_code_accountancy: string, date_creation: string, date_modification: string, note_private: string, note_public: string, address: string, zip: string, town: string, region_code: string, country_id: string, country_code: string, country: string, phone: string, fax: string, email: string, url: string, profid1: string, profid2: string, profid3: string, profid4: string, profid5: string, profid6: string, capital: string, vat_used: string, vat_number: string} $thirdparty)

Update a thirdparty

void
usage(string $program, string $header)

Print the usage when executing scripts from install/.

array<array{0: string, 1: string, 2: string}>
user_admin_prepare_head()

Prepare array with list of tabs

array<array{0: string, 1: string, 2: string}>
user_prepare_head(User $object)

Prepare array with list of tabs

string
utf162utf8(string $utf16)

Convert a string from one UTF-16 char to one UTF-8 char

string
utf82utf16(string $utf8)

Convert a string from one UTF-8 char to one UTF-16 char

bool
utf8_check(null|string|int $str)

Check if a string is in UTF8. Seems similar to utf8_valid() but in pure PHP.

string
utf8_decode(mixed $elements)

Implement utf8_decode for PHP that does not support it.

string
utf8_encode(mixed $elements)

Implement utf8_encode for PHP that does not support it.

bool
utf8_valid($str)

Check if a string is in UTF8. Seems similar to utf8_check().

int
valeur($sql)

Get result of sql for field amount

array{result: array{result_code: string, result_label: string}}
validOrder(array{login: string, password: string, entity: ?int, dolibarrkey: string} $authentication, int $id = 0, int $id_warehouse = 0)

Valid an order

array<array{0: string, 1: string, 2: string}>
various_payment_prepare_head(CommonObject $object)

Prepare array with list of tabs

vat_by_date(DoliDB $db, $y, $q, $date_start, $date_end, $modetax, $direction, $m = 0)

Gets VAT to collect for the given year (and given quarter or month) The function gets the VAT in split results, as the VAT declaration asks to report the amounts for different VAT rates as different lines.

vat_by_thirdparty($db, int $y, $date_start, $date_end, $modetax, $direction, $m = 0)

Look for collectable VAT clients in the chosen year (and month)

array<array{0: string, 1: string, 2: string}>
vat_prepare_head(Tva $object)

Prepare array with list of tabs

vatrate(string $rate, $addpercent = false, int $info_bits = 0, int $usestarfornpr = 0, $html = 0)

Return a string with VAT rate label formatted for view output Used into pdf and HTML pages

bool
verifCond(string $strToEvaluate, string $onlysimplestring = '1')

Verify if condition in string is ok or not

verif_email($email)

No description

verif_num($num)

No description

verif_url($url)

No description

version_db()

Return DB version

version_dolibarr()

Return Dolibarr version

version_os(string $option = '')

Return OS version.

version_php()

Return PHP version

version_webserver()

Return web server version

int<-4, 4>
versioncompare(array<int|string> $versionarray1, array<int|string> $versionarray2)

Compare 2 versions (stored into 2 arrays), to know if a version (a,b,c) is lower than (x,y,z) To check using a string version do a preg_split('/[.-]/', strinversion) to convert the string into an array.

array<int<0, 2>, string>
versiondolibarrarray()

Return version Dolibarr

array<int<0, 2>, string>
versionphparray()

Return version PHP

string
versiontostring($versionarray)

Renvoi une version en chaine depuis une version en tableau

viewCsvFileContent($file_to_include = '', $max_rows = 0)

\brief Affiche le contenu d'un fichier CSV sous forme de tableau \param file_to_include Fichier CSV a afficher \param max_rows Nombre max de lignes a afficher (0 = illimit�)

viewExcelFileContent($file_to_include = '', $max_rows = 0, $max_cols = 0)

\brief Affiche le contenu d'un fichier Excel (avec les feuilles de calcul) sous forme de tableau \param file_to_include Fichier Excel a afficher \param max_rows Nombre max de lignes a afficher (0 = illimite) \param max_cols Nombre max de colonnes a afficher (0 = illimite)

vignette(string $file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', $quality = 50, $outdir = 'thumbs', $targetformat = 0)

Create a thumbnail from an image file (Supported extensions are gif, jpg, png and bmp).

array<array{0: string, 1: string, 2: string}>
webhookAdminPrepareHead()

Prepare admin pages header

array<array{0: string, 1: string, 2: string}>
webportalAdminPrepareHead()

Prepare admin pages header

array<string, array<string, string>>
websiteGetContentPolicyDirectives()

Prepare array of directives for Website

array<string, array<string, array<string, string>>>
websiteGetContentPolicySources()

Prepare array of sources for Website

array<string, array<string|int, array<string|int, string>|string>>
websiteGetContentPolicyToArray(string $forceCSP)

Transform a Content Security Policy to an array

array<array{0: string, 1: string, 2: string}>
websiteaccountPrepareHead(SocieteAccount $object)

Prepare array of tabs for SocieteAccount

array<array{0: string, 1: string, 2: string}>
websiteconfigPrepareHead(Website $object)

Prepare array of tabs for Website

float
weight_convert(float $weight, int $from_unit, int $to_unit)

Convertit une masse d'une unite vers une autre unite

array<array{0: string, 1: string, 2: string}>
workstationAdminPrepareHead()

Prepare admin pages header

array<array{0: string, 1: string, 2: string}>
workstationPrepareHead(Workstation $object)

Prepare array of tabs for Workstation

int<-1, 1>
writeApiUrlsInDoc(string $file_api, string $file_doc)

Generate Urls and add them to documentation module

int<-1, 1>
writePermsInAsciiDoc(string $file, string $destfile)

Write all permissions of each object in AsciiDoc format

int
writePropsInAsciiDoc(string $file, string $objectname, string $destfile)

Write all properties of the object in AsciiDoc format

int
write_conf_file($conffile)

Save configuration file. No particular permissions are set by installer.

write_main_file($mainfile, string $main_dir)

Create main file. No particular permissions are set by installer.

write_master_file($masterfile, string $main_dir)

Create master file. No particular permissions are set by installer.

array<string, mixed|mixed[]>|string
xml2php(SimpleXMLElement $xml)

Function to convert an XML object into an array

int
xyzToUnixTimestamp($mysqldate)

Convert date to timestamp

string
yn(bool|int<0, 1>|"yes"|"true"|"no"|"false" $yesno, int|string $format = 1, int $color = 0)

Return yes or no in current language

array<array{0: string, 1: string, 2: string}>
zapierAdminPrepareHead()

Prepare admin pages header

void
zapierPostWebhook(string $url, string $json)

Post webhook in zapier with object data

bool
zipDir(string $folder, ZipArchive $zip, string $root = "")

build a zip file with only php code and no external depends on "zip" exec for example

Exceptions

Class to manage exceptions